Attempted fix for #19870 - Crash on Shift Numpad 1 based on the backtrace http:/...
authorJoshua Leung <aligorith@gmail.com>
Fri, 20 Nov 2009 10:34:31 +0000 (10:34 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 20 Nov 2009 10:34:31 +0000 (10:34 +0000)
source/blender/editors/transform/transform_orientations.c

index 463af9616823e1c0f4a971486357392112c56466..8847d0ccd58b23828c5cc402e09729c269852d2e 100644 (file)
@@ -916,8 +916,10 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                        }
                }
                
-               VECCOPY(normal, ob->obmat[2]);
-               VECCOPY(plane, ob->obmat[1]);
+               if (ob) {
+                       VECCOPY(normal, ob->obmat[2]);
+                       VECCOPY(plane, ob->obmat[1]);
+               }
                result = ORIENTATION_NORMAL;
        }