fix issues

- fix nullptr name assignment error on CKObject.
- remove slot check for CKTexture::GetFileName in BMap. return nullptr, not throw error when no slot to get file name.
This commit is contained in:
yyc12345 committed 2023-11-15 23:05:21 +08:00
1 parent d8b7ace53d
commit 7c6dd463bd
2 files changed
+5 -4

No files matched your search

-2
View File
@@ -371,8 +371,6 @@ bool BMTexture_GetFileName(BMPARAM_OBJECT_DECL(bmfile, objid), BMPARAM_OUT(LibCm
auto obj = CheckCKTexture(bmfile, objid);
if (obj == nullptr) return false;
if (obj->GetUnderlyingData().GetSlotCount() == 0) return false;
BMPARAM_OUT_ASSIGN(out_filename, obj->GetUnderlyingData().GetSlotFileName(0));
return true;
}