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>2010-11-27 21:30:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-27 21:30:56 +0300
commit6c7403b8bd16998720e23d9a5ecd45730ae47dcc (patch)
tree31dfb56c69e8a382a396dd6291cbebfa8fb1d47a /source/blender/editors
parent02cc80691d71ea305780655d3b0d4cd4530db9c7 (diff)
bugfix [#24944] Crash on attempting to keyframe HSV color
prevent eternal loop
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_handlers.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 9216e3f2a83..22f1771923b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4938,17 +4938,16 @@ void ui_button_active_free(const bContext *C, uiBut *but)
void uiContextActiveProperty(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index)
{
ARegion *ar= CTX_wm_region(C);
- uiBlock *block;
- uiBut *but, *activebut;
memset(ptr, 0, sizeof(*ptr));
*prop= NULL;
*index= 0;
while(ar) {
+ uiBlock *block;
+ uiBut *but, *activebut= NULL;
+
/* find active button */
- activebut= NULL;
-
for(block=ar->uiblocks.first; block; block=block->next) {
for(but=block->buttons.first; but; but= but->next) {
if(but->active)
@@ -4958,20 +4957,20 @@ void uiContextActiveProperty(const bContext *C, struct PointerRNA *ptr, struct P
}
}
- if(activebut) {
- if(activebut->rnapoin.data) {
- uiHandleButtonData *data= activebut->active;
-
- /* found RNA button */
- *ptr= activebut->rnapoin;
- *prop= activebut->rnaprop;
- *index= activebut->rnaindex;
-
- /* recurse into opened menu, like colorpicker case */
- if(data && data->menu)
- ar = data->menu->region;
- else
- return;
+ if(activebut && activebut->rnapoin.data) {
+ uiHandleButtonData *data= activebut->active;
+
+ /* found RNA button */
+ *ptr= activebut->rnapoin;
+ *prop= activebut->rnaprop;
+ *index= activebut->rnaindex;
+
+ /* recurse into opened menu, like colorpicker case */
+ if(data && data->menu && (ar != data->menu->region)) {
+ ar = data->menu->region;
+ }
+ else {
+ return;
}
}
else {