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>2007-09-01 03:23:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-09-01 03:23:38 +0400
commit50ea5681794e1494d5b293539ff52ba3ca78c349 (patch)
tree9507f2a5f3d9850f590d85f70e15fd6183fca117
parent32fddfbe064e6f39d77039a3294bebb8c502f728 (diff)
Bugfix for [#7018] Hiding, unhiding a spot lamp and then setting it to buf shadow segfaults
buttons were not redrawing so it was possible to use them without an active object, this crashed blender.
-rw-r--r--source/blender/src/editobject.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index c4736a84837..757ca322bdd 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -5486,14 +5486,17 @@ int object_data_is_libdata(Object *ob)
void hide_objects(int select)
{
Base *base;
- int changed = 0;
+ short changed = 0, changed_act = 0;
for(base = FIRSTBASE; base; base=base->next){
if(TESTBASELIB(base)==select){
base->flag &= ~SELECT;
base->object->flag = base->flag;
base->object->restrictflag |= OB_RESTRICT_VIEW;
changed = 1;
- if (base==BASACT) BASACT= NULL;
+ if (base==BASACT) {
+ BASACT= NULL;
+ changed_act = 1;
+ }
}
}
if (changed) {
@@ -5502,6 +5505,12 @@ void hide_objects(int select)
DAG_scene_sort(G.scene);
allqueue(REDRAWVIEW3D,0);
allqueue(REDRAWOOPS,0);
+ allqueue(REDRAWDATASELECT,0);
+ if (changed_act) { /* these spaces depend on the active object */
+ allqueue(REDRAWBUTSALL,0);
+ allqueue(REDRAWIPO,0);
+ allqueue(REDRAWACTION,0);
+ }
countall();
}
}