From 893607c96c1d61539d7cd33f0ab10cc435ca2132 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 1 Apr 2017 10:36:35 +0300 Subject: [PATCH] Fixed crash in decals handling caused by reference to undefined class https://forum.drdteam.org/viewtopic.php?t=7589 --- src/decallib.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/decallib.cpp b/src/decallib.cpp index d4ca5984b..d9f22499e 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -370,6 +370,12 @@ void FDecalLib::ReadAllDecals () for (i = 0; i < PClassActor::AllActorClasses.Size(); i++) { AActor *def = (AActor*)GetDefaultByType (PClassActor::AllActorClasses[i]); + if (nullptr == def) + { + // This is referenced but undefined class + // The corresponding warning should be already reported by DECORATE parser + continue; + } FName v = ENamedName(intptr_t(def->DecalGenerator)); if (v.IsValidName())