diff options
author | Matt Ebb <matt@mke3.net> | 2009-12-10 08:05:04 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-12-10 08:05:04 +0300 |
commit | 4bcb759c946e2a3f2f676d2f57e3536478dc7613 (patch) | |
tree | 3ba03d385804f2687c7e0038dcca7c10b22a0152 /source/blender/editors | |
parent | 64c29743c3a25bbcafcd03bdec9e3f1764f43ba1 (diff) |
Attempted fix for [#19810] Crash when flipping header with F5
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1a0ae95dfe0..838af633362 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1303,7 +1303,7 @@ static int region_scale_invoke(bContext *C, wmOperator *op, wmEvent *event) sActionzoneData *sad= event->customdata; AZone *az; - if(event->type!=EVT_ACTIONZONE_AREA) { + if(event->type!=EVT_ACTIONZONE_REGION) { BKE_report(op->reports, RPT_ERROR, "Can only scale region size from an action zone"); return OPERATOR_CANCELLED; } @@ -2111,6 +2111,9 @@ static int region_flip_exec(bContext *C, wmOperator *op) { ARegion *ar= CTX_wm_region(C); + if (!ar) + return OPERATOR_CANCELLED; + if(ar->alignment==RGN_ALIGN_TOP) ar->alignment= RGN_ALIGN_BOTTOM; else if(ar->alignment==RGN_ALIGN_BOTTOM) @@ -2121,7 +2124,6 @@ static int region_flip_exec(bContext *C, wmOperator *op) ar->alignment= RGN_ALIGN_LEFT; WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); - printf("executed region flip\n"); return OPERATOR_FINISHED; } |