فهرست منبع

drwr: fix crash on partial transform across compass

Darren Ranalli 20 سال پیش
والد
کامیت
4ef35cf5b1
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      panda/src/pgraph/nodePath.cxx

+ 5 - 1
panda/src/pgraph/nodePath.cxx

@@ -5062,7 +5062,11 @@ r_get_partial_transform(NodePathComponent *comp, int n) const {
       return NULL;
     }
     CPT(TransformState) transform = comp->get_node()->get_transform();
-    return r_get_partial_transform(comp->get_next(), n - 1)->compose(transform);
+    CPT(TransformState) partial = r_get_partial_transform(comp->get_next(), n - 1);
+    if (partial == (const TransformState *)NULL) {
+      return NULL;
+    }
+    return partial->compose(transform);
   }
 }