diff options
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 2a75c2a26c1..b50df29918d 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -458,11 +458,16 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) * - otherwise, up to info (which is what users normally see) */ str = BKE_reports_string(reports, (G.f & G_DEBUG)? RPT_DEBUG : RPT_INFO); - - write_text(txt, str); - MEM_freeN(str); - - return OPERATOR_FINISHED; + + if (str) { + write_text(txt, str); + MEM_freeN(str); + + return OPERATOR_FINISHED; + } + else { + return OPERATOR_CANCELLED; + } } static void UI_OT_reports_to_textblock(wmOperatorType *ot) |