mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-23 14:41:33 -04:00
fix JAISeqMgr beginStartSeq_ to check free memory before allocation
This commit is contained in:
@@ -120,11 +120,19 @@ void JAISeqMgr::mixOut() {
|
||||
}
|
||||
|
||||
JAISeq* JAISeqMgr::beginStartSeq_() {
|
||||
JAISeq* seq = JKR_NEW JAISeq(this, field_0x10);
|
||||
#ifdef TARGET_PC
|
||||
if (JAISeq::getFreeMemCount() == 0) {
|
||||
JUT_WARN(273, "%s", "JASPoolAllocObject::<JAISeq>::operator new failed .\n");
|
||||
return NULL;
|
||||
}
|
||||
return JKR_NEW JAISeq(this, field_0x10);
|
||||
#else
|
||||
JAISeq* seq = new JAISeq(this, field_0x10);
|
||||
if (seq == NULL) {
|
||||
JUT_WARN(273, "%s", "JASPoolAllocObject::<JAISeq>::operator new failed .\n");
|
||||
}
|
||||
return seq;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool JAISeqMgr::endStartSeq_(JAISeq* seq, JAISoundHandle* handle) {
|
||||
|
||||
Reference in New Issue
Block a user