fix for own recent commit removing NULL checks from TREESTORE macro - this use needed it.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 28 May 2012 15:37:43 +0000 (15:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 28 May 2012 15:37:43 +0000 (15:37 +0000)
source/blender/editors/space_outliner/outliner_tools.c

index a3ed2eac2d52fc1fcfba0d0df26f07917e9d3879..cf236c66e5379b14184c410b3a0cb653f6cc436f 100644 (file)
@@ -226,7 +226,7 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *
                tselem = TREESTORE(te);
                if (tselem->flag & TSE_SELECTED) {
                        if (tselem->type == 0) {
-                               TreeStoreElem *tsep = TREESTORE(te->parent);
+                               TreeStoreElem *tsep = te->parent ? TREESTORE(te->parent) : NULL;
                                operation_cb(C, scene, te, tsep, tselem);
                        }
                }
@@ -866,7 +866,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l
                tselem = TREESTORE(te);
                if (tselem->flag & TSE_SELECTED) {
                        if (tselem->type == type) {
-                               TreeStoreElem *tsep = TREESTORE(te->parent);
+                               TreeStoreElem *tsep = te->parent ? TREESTORE(te->parent) : NULL;
                                operation_cb(te, tselem, tsep, newid);
                        }
                }