diff options
author | Ton Roosendaal <ton@blender.org> | 2003-08-07 18:08:41 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2003-08-07 18:08:41 +0400 |
commit | e2a702a7b41a573b34d2432af141d4f09ee3ba62 (patch) | |
tree | 129f499f949528010b1ef2277282219e6cc1afba /source/blender | |
parent | d24761807dcd84ddaaae905d6a04181755239c60 (diff) |
- Fixed bug #440, an error resulting from work at optimizing 'glflush'
calls.
Added a comment in the code why it happens... its about safely
escaping from buttons/blocks loops before loading a new file!
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/interface.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index bcec43f0955..96f12c98f7c 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -3611,6 +3611,15 @@ int uiDoBlocks(ListBase *lb, int event) if(retval==UI_CONT || (retval & UI_RETURN_OK)) cont= 0; } + /* cleanup frontbuffer & flags */ + block= lb->first; + while(block) { + if(block->frontbuf==UI_HAS_DRAW_FRONT) glFinish(); + block->frontbuf= 0; + block= block->next; + } + + /* afterfunc is used for fileloading too, so after this call, the blocks pointers are invalid */ if(retval & UI_RETURN_OK) { if(UIafterfunc) UIafterfunc(UIafterfunc_arg, UIafterval); UIafterfunc= NULL; @@ -3621,15 +3630,6 @@ int uiDoBlocks(ListBase *lb, int event) if(U.flag & TOOLTIPS) ui_do_but_tip(); } - - /* cleanup frontbuffer & flags */ - block= lb->first; - while(block) { - if(block->frontbuf==UI_HAS_DRAW_FRONT) glFinish(); - block->frontbuf= 0; - block= block->next; - } - /* doesnt harm :-) */ glDrawBuffer(GL_BACK); |