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:
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index cf930d635a7..b5d7bbd022a 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -542,7 +542,7 @@ static void ui_apply_but_funcs_after(bContext *C)
/* copy to avoid recursive calls */
funcs = UIAfterFuncs;
- UIAfterFuncs.first = UIAfterFuncs.last = NULL;
+ BLI_listbase_clear(&UIAfterFuncs);
for (afterf = funcs.first; afterf; afterf = after.next) {
after = *afterf; /* copy to avoid memleak on exit() */
@@ -7906,8 +7906,9 @@ static int ui_handler_region(bContext *C, const wmEvent *event, void *UNUSED(use
ar = CTX_wm_region(C);
retval = WM_UI_HANDLER_CONTINUE;
- if (ar == NULL) return retval;
- if (ar->uiblocks.first == NULL) return retval;
+ if (ar == NULL || BLI_listbase_is_empty(&ar->uiblocks)) {
+ return retval;
+ }
/* either handle events for already activated button or try to activate */
but = ui_but_find_activated(ar);