Fix T64111: add a NULL check to avoid crash with bad constraint subtarget.
authorAlexander Gavrilov <angavrilov@gmail.com>
Mon, 6 May 2019 17:30:18 +0000 (20:30 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Mon, 6 May 2019 17:31:22 +0000 (20:31 +0300)
source/blender/depsgraph/intern/builder/deg_builder.cc

index b8e0ba510198f498484f0407ffe75686a04d5449..71f482e8630e97394c9f3edc5be8a90bd87cbd85 100644 (file)
@@ -103,7 +103,7 @@ bool DepsgraphBuilder::need_pull_base_into_graph(Base *base)
 bool DepsgraphBuilder::check_pchan_has_bbone(Object *object, const bPoseChannel *pchan)
 {
   BLI_assert(object->type == OB_ARMATURE);
-  if (pchan->bone == NULL) {
+  if (pchan == NULL || pchan->bone == NULL) {
     return false;
   }
   /* We don't really care whether segments are higher than 1 due to static user input (as in,