From 4bcb759c946e2a3f2f676d2f57e3536478dc7613 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Thu, 10 Dec 2009 05:05:04 +0000 Subject: Attempted fix for [#19810] Crash when flipping header with F5 --- source/blender/editors/screen/screen_ops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors') 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; } -- cgit v1.2.3