Skip to content

Commit a945a49

Browse files
committed
Added assertion for ThingTemplate to ctor of PartitionFilterThing.
1 parent 84cd09c commit a945a49

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Generals/Code/GameEngine/Include/GameLogic/PartitionManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,9 @@ class PartitionFilterThing : public PartitionFilter
10901090
Bool m_match;
10911091

10921092
public:
1093-
PartitionFilterThing(const ThingTemplate *thing, Bool match) : m_tThing(thing), m_match(match) {}
1093+
PartitionFilterThing(const ThingTemplate *thing, Bool match) : m_tThing(thing), m_match(match) {
1094+
DEBUG_ASSERTCRASH(m_tThing != NULL, ("ThingTemplate for PartitionFilterThing is NULL"));
1095+
}
10941096
protected:
10951097
virtual Bool allow( Object *other );
10961098
#if defined(RTS_DEBUG)

GeneralsMD/Code/GameEngine/Include/GameLogic/PartitionManager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,9 @@ class PartitionFilterThing : public PartitionFilter
11271127
Bool m_match;
11281128

11291129
public:
1130-
PartitionFilterThing(const ThingTemplate *thing, Bool match) : m_tThing(thing), m_match(match) {}
1130+
PartitionFilterThing(const ThingTemplate *thing, Bool match) : m_tThing(thing), m_match(match) {
1131+
DEBUG_ASSERTCRASH(m_tThing != NULL, ("ThingTemplate for PartitionFilterThing is NULL"));
1132+
}
11311133
protected:
11321134
virtual Bool allow( Object *other );
11331135
#if defined(RTS_DEBUG)

0 commit comments

Comments
 (0)