From 5c2474814b9ef9371bd3d875a6951f109776e7ae Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 7 May 2023 15:48:19 -0700 Subject: [PATCH] Fix crash in DynOS_Actor_AddCustom --- data/dynos_mgr_actor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/dynos_mgr_actor.cpp b/data/dynos_mgr_actor.cpp index 7216865b..6871f275 100644 --- a/data/dynos_mgr_actor.cpp +++ b/data/dynos_mgr_actor.cpp @@ -48,8 +48,13 @@ void DynOS_Actor_AddCustom(const SysPath &aFilename, const char *aActorName) { // Alloc and init the actors gfx list ActorGfx actorGfx = { }; actorGfx.mGfxData = _GfxData; - actorGfx.mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, false); actorGfx.mPackIndex = MOD_PACK_INDEX; + actorGfx.mGraphNode = (GraphNode *) DynOS_Geo_GetGraphNode(geoLayout, false); + if (!actorGfx.mGraphNode) { + Print(" ERROR: Couldn't load graph node for \"%s\"", actorName); + free(actorName); + return; + } actorGfx.mGraphNode->georef = georef; // Add to custom actors