Skip to content

Commit e691f17

Browse files
authored
[CORE] Fix dereferencing NULL pointer 'ptemp_obj' in AggregateDefClass::Find_Subobject() (#1147)
1 parent 10a8356 commit e691f17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Core/Libraries/Source/WWVegas/WW3D2/agg_def.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ AggregateDefClass::Find_Subobject
256256

257257
// Is this the subobject we were looking for?
258258
RenderObjClass *ptemp_obj = parent_model->Get_Sub_Object_On_Bone (subobj_index, bone_index);
259+
if (ptemp_obj == NULL)
260+
continue;
261+
259262
if (::lstrcmpi (ptemp_obj->Get_Name (), mesh_path[index]) == 0) {
260263
sub_obj = ptemp_obj;
261264
} else {

0 commit comments

Comments
 (0)