diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-07-24 22:41:47 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-07-24 22:41:47 +0000 |
| commit | 446c329930b635464a3394e00a0a8d5dd11ce850 (patch) | |
| tree | 7c0fe3cff906d01e937b99d6679a326287a83628 /src/file.cpp | |
| parent | added finnish translation (diff) | |
| download | inkscape-446c329930b635464a3394e00a0a8d5dd11ce850.tar.gz inkscape-446c329930b635464a3394e00a0a8d5dd11ce850.zip | |
Fix a null pointer bug I made myself. Sorry.
(bzr r1469)
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp index a9c9184f6..6154fb97d 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -87,7 +87,10 @@ void dump_ustr(Glib::ustring const &ustr); SPDesktop* sp_file_new(const Glib::ustring &templ) { - SPDocument *doc = sp_document_new(templ.c_str(), TRUE, true); + char *templName = NULL; + if (templ.size()>0) + templName = (char *)templ.c_str(); + SPDocument *doc = sp_document_new(templName, TRUE, true); g_return_val_if_fail(doc != NULL, NULL); SPDesktop *dt; @@ -130,7 +133,7 @@ sp_file_new_default() sources.pop_front(); } - return sp_file_new(NULL); + return sp_file_new(""); } |
