workaround/fix [#27162] Running commands in python console crashes blender
[blender-staging.git] / source / blender / windowmanager / intern / wm_operators.c
index 3f3a117f38960861d67f05c198644c934f720939..100dd914026de5dcceb95f81e7e6972b46ee14f7 100644 (file)
@@ -1948,11 +1948,14 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
                BKE_report(op->reports, RPT_ERROR, "No filename given");
                return OPERATOR_CANCELLED;
        }
-       
+
        RNA_string_get(op->ptr, "filepath", filename);
-       collada_export(CTX_data_scene(C), filename);
-       
-       return OPERATOR_FINISHED;
+       if(collada_export(CTX_data_scene(C), filename)) {
+               return OPERATOR_FINISHED;
+       }
+       else {
+               return OPERATOR_CANCELLED;
+       }
 }
 
 static void WM_OT_collada_export(wmOperatorType *ot)