diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-15 00:45:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-15 00:45:49 +0300 |
commit | 69c582a3d401e7a143a26d8d66597f003bffbda0 (patch) | |
tree | 0b2782682ca2315dd4b28fd94c312726734d274e | |
parent | eac31a2eceb6601967484301c5f25b7a138f623b (diff) |
error in last commit, also skip getting vars for wm_operator_reports() when there are no reports.
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 36f618d04a9..11075fe402e 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -2730,8 +2730,8 @@ static struct ImBuf * do_solid_color( unsigned char *rect; float *rect_float; - /*int x = context.rectx;*/ /*UNUSED*/ - /*int y = context.recty;*/ /*UNUSED*/ + int x; /*= context.rectx;*/ /*UNUSED*/ + int y; /*= context.recty;*/ /*UNUSED*/ if (out->rect) { unsigned char col0[3]; diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 7d5cdb8a10c..be6700f2ea1 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -423,10 +423,6 @@ static void wm_operator_print(bContext *C, wmOperator *op) static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int popup) { - wmWindowManager *wm = CTX_wm_manager(C); - ReportList *reports = CTX_wm_reports(C); - char *buf; - if(popup) if(op->reports->list.first) uiPupMenuReports(C, op->reports); @@ -437,26 +433,29 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop if (op->type->flag & OPTYPE_REGISTER) { /* Report the python string representation of the operator */ - buf = WM_operator_pystring(C, op->type, op->ptr, 1); + char *buf = WM_operator_pystring(C, op->type, op->ptr, 1); BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf); MEM_freeN(buf); } } if (op->reports->list.first) { + + wmWindowManager *wm = CTX_wm_manager(C); + ReportList *wm_reports= CTX_wm_reports(C); ReportTimerInfo *rti; - + /* add reports to the global list, otherwise they are not seen */ - BLI_movelisttolist(&CTX_wm_reports(C)->list, &op->reports->list); + BLI_movelisttolist(&wm_reports->list, &op->reports->list); /* After adding reports to the global list, reset the report timer. */ - WM_event_remove_timer(wm, NULL, reports->reporttimer); + WM_event_remove_timer(wm, NULL, wm_reports->reporttimer); /* Records time since last report was added */ - reports->reporttimer= WM_event_add_timer(wm, CTX_wm_window(C), TIMER, 0.05); + wm_reports->reporttimer= WM_event_add_timer(wm, CTX_wm_window(C), TIMER, 0.05); rti = MEM_callocN(sizeof(ReportTimerInfo), "ReportTimerInfo"); - reports->reporttimer->customdata = rti; + wm_reports->reporttimer->customdata = rti; } } |