projects
/
synfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4cfe2b6
)
Fix bug: 2175043. Crash when destination file not writable or path doesn't exists.
author
Carlos Lopez
<carlos@pcnuevo.(none)>
Sun, 12 Jul 2009 17:45:10 +0000
(19:45 +0200)
committer
Carlos Lopez
<carlos@pcnuevo.(none)>
Sun, 12 Jul 2009 17:45:10 +0000
(19:45 +0200)
synfig-studio/trunk/src/gtkmm/render.cpp
patch
|
blob
|
history
diff --git
a/synfig-studio/trunk/src/gtkmm/render.cpp
b/synfig-studio/trunk/src/gtkmm/render.cpp
index
4696a47
..
cec4215
100644
(file)
--- a/
synfig-studio/trunk/src/gtkmm/render.cpp
+++ b/
synfig-studio/trunk/src/gtkmm/render.cpp
@@
-40,6
+40,8
@@
#include "general.h"
#include "general.h"
+#include <fstream>
+
#endif
/* === U S I N G =========================================================== */
#endif
/* === U S I N G =========================================================== */
@@
-287,6
+289,14
@@
RenderSettings::on_render_pressed()
canvas_interface_->get_ui_interface()->error(_("Unable to create target for ")+filename);
return;
}
canvas_interface_->get_ui_interface()->error(_("Unable to create target for ")+filename);
return;
}
+ // This is the only way I've found to avoid send a non writable
+ // filename path to the renderer.
+ fstream filetest (filename.c_str(), fstream::out);
+ if (filetest.fail())
+ {
+ canvas_interface_->get_ui_interface()->error(_("Unable to create file for ")+filename);
+ return;
+ }
hide();
hide();