diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-04-16 09:24:58 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-04-16 09:24:58 +0400 |
commit | 911c136c89af436db1339b6b526f388f7a103cf2 (patch) | |
tree | deb317e453c6382ec55d0670c71adc2b0d2874aa /source | |
parent | ecf98473c2a7f1b6f7ce836c3db6fdbc7b3f97c9 (diff) |
Fix warning, also added error message for the case of no filename passed.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 6 |
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; |