diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 43a5d86fe7..b55faee3f6 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -2453,7 +2453,12 @@ u8 CameraObjectGetFollowedObjectId(void) void CameraObjectReset2(void) { - FindCameraObject()->data[1] = 2; + struct Sprite *cameraObject = FindCameraObject(); +#ifdef UBFIX + if (cameraObject == NULL) + return; +#endif + cameraObject->data[1] = 2; } u8 CopySprite(struct Sprite *sprite, s16 x, s16 y, u8 subpriority)