The patch to pre-emptify the queues for 'clever numbuts' didn't check for
authorTon Roosendaal <ton@blender.org>
Mon, 30 Jan 2006 11:30:37 +0000 (11:30 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 30 Jan 2006 11:30:37 +0000 (11:30 +0000)
non-existant windows, causing crash for example in Action window for shapes

source/blender/src/toolbox.c

index 88ad8ae4e3e0e667e5fbb2c0a50c5e1275705ced..5576b8b6ae6941211c385964ee6accc0dac212b8 100644 (file)
@@ -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 */