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:
authorTon Roosendaal <ton@blender.org>2012-11-06 14:35:02 +0400
committerTon Roosendaal <ton@blender.org>2012-11-06 14:35:02 +0400
commit441becf22dfa48af61e485cca13a19a7ae5892e9 (patch)
treee0ca3ef9d6c831b9146a0bb6f0626d11dd0db995 /source/blender/windowmanager/intern/wm_draw.c
parentf07a563f3b12c9bccdc2a0e8e6e78268b07d5246 (diff)
Bugfix #33096
Code drawing paint cursors in regions didn't check for zero-sized regions well. Causing error prints: wmSubWindowScissorSet 0: doesn't exist Harmless, but nicer to handle it correct :)
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 66bb321e832..d7285ec4380 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -84,7 +84,7 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar)
bScreen *screen = win->screen;
wmPaintCursor *pc;
- if (screen->subwinactive == ar->swinid) {
+ if (ar->swinid && screen->subwinactive == ar->swinid) {
for (pc = wm->paintcursors.first; pc; pc = pc->next) {
if (pc->poll == NULL || pc->poll(C)) {
ARegion *ar_other = CTX_wm_region(C);
@@ -631,7 +631,7 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win)
if (paintcursor && wm->paintcursors.first) {
for (sa = screen->areabase.first; sa; sa = sa->next) {
for (ar = sa->regionbase.first; ar; ar = ar->next) {
- if (ar->swinid == screen->subwinactive) {
+ if (ar->swinid && ar->swinid == screen->subwinactive) {
CTX_wm_area_set(C, sa);
CTX_wm_region_set(C, ar);