From 324c2faf957b47d83ffd125eb21855261abab544 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 12 Feb 2018 11:48:13 -0600 Subject: [PATCH] don't try to physically interact with a prefab with invalid entries --- Engine/source/T3D/prefab.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Engine/source/T3D/prefab.cpp b/Engine/source/T3D/prefab.cpp index 6d357565f..6d32e2fd6 100644 --- a/Engine/source/T3D/prefab.cpp +++ b/Engine/source/T3D/prefab.cpp @@ -528,6 +528,11 @@ bool Prefab::isValidChild( SimObject *simobj, bool logWarnings ) bool Prefab::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere) { Vector foundObjects; + if (mChildGroup.isNull() || mChildGroup->empty()) + { + Con::warnf("Bad Prefab Config! %s has no valid entries!", getName()); + return false; + } mChildGroup->findObjectByType(foundObjects); for (S32 i = 0; i < foundObjects.size(); i++)