Update event_object_movement.c

This commit is contained in:
DizzyEggg 2020-08-02 15:37:04 +02:00 committed by GitHub
parent 7890a16d27
commit d072897354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2341,7 +2341,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId)
static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup)
{
struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup);
#if UBFIX
#ifdef UBFIX
// BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers.
if (obj == NULL)
return 0;