Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2010-04-16 09:24:58 +0400
committerAndrea Weikert <elubie@gmx.net>2010-04-16 09:24:58 +0400
commit911c136c89af436db1339b6b526f388f7a103cf2 (patch)
treedeb317e453c6382ec55d0670c71adc2b0d2874aa
parentecf98473c2a7f1b6f7ce836c3db6fdbc7b3f97c9 (diff)
Fix warning, also added error message for the case of no filename passed.
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 7e309b9c876..b6126da33a2 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -491,7 +491,11 @@ int WM_write_file(bContext *C, char *target, int fileflags, ReportList *reports)
len = strlen(target);
- if (len == 0) return;
+ if (len == 0) {
+ BKE_report(reports, RPT_ERROR, "Path is empty, cannot save");
+ return -1;
+ }
+
if (len >= FILE_MAX) {
BKE_report(reports, RPT_ERROR, "Path too long, cannot save");
return -1;