Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-15 10:29:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-15 10:29:32 +0400
commit77ed2d8ca9af8bb646ceb56f47e7a9e21d1eaaee (patch)
tree9f7bf0a150b958f0a56ed9eae00fbc516618a6ac /source/blender/editors/space_outliner/outliner_select.c
parentaa364bb366d8c0d6566ffacd59d881a8bab8657b (diff)
code cleanup: remove paranoid NULL checks (these cases would crash earlier of the vars were in fact NULL)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 8b7cf406642..823de61d044 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -433,8 +433,11 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
if (set) {
if (!(bone->flag & BONE_HIDDEN_P)) {
- if (set == 2) ED_pose_deselectall(OBACT, 2); // 2 is clear active tag
- else ED_pose_deselectall(OBACT, 0);
+ Object *ob = OBACT;
+ if (ob) {
+ if (set == 2) ED_pose_deselectall(ob, 2); // 2 is clear active tag
+ else ED_pose_deselectall(ob, 0);
+ }
if (set == 2 && (bone->flag & BONE_SELECTED)) {
bone->flag &= ~BONE_SELECTED;
@@ -444,7 +447,7 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
arm->act_bone = bone;
}
- WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, OBACT);
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, ob);
}
}
else {