From ba83c7ffebee150a6ee92ec09e0125013ed358ea Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 30 Jan 2006 11:30:37 +0000 Subject: [PATCH] The patch to pre-emptify the queues for 'clever numbuts' didn't check for non-existant windows, causing crash for example in Action window for shapes --- source/blender/src/toolbox.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 88ad8ae4e3e..5576b8b6ae6 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1366,8 +1366,12 @@ int do_clever_numbuts(char *name, int tot, int winevent) ScrArea *sa; BWinEvent temp_bevt; for (sa= G.curscreen->areabase.first; sa; sa= sa->next) { - while( bwin_qread( sa->win, &temp_bevt ) ) {} - while( bwin_qread( sa->headwin, &temp_bevt ) ) {} + if(sa->win) { + while( bwin_qread( sa->win, &temp_bevt ) ) {} + } + if(sa->headwin) { + while( bwin_qread( sa->headwin, &temp_bevt ) ) {} + } } /* Done clearing events */