summaryrefslogtreecommitdiffstats
path: root/src/uri-references.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-02-07 12:27:42 +0000
committertavmjong-free <tavmjong@free.fr>2014-02-07 12:27:42 +0000
commit9dc9db77232e264edcfec1e6ba6437130ac4c0eb (patch)
tree6b444299f5791a7811012a3ccc51f47735a325f9 /src/uri-references.cpp
parentMarkers are never shown directly, even if outside of <defs> section. (diff)
downloadinkscape-9dc9db77232e264edcfec1e6ba6437130ac4c0eb.tar.gz
inkscape-9dc9db77232e264edcfec1e6ba6437130ac4c0eb.zip
Prevent attempt to initialize/compare std::string with/to null pointer.
(bzr r13004)
Diffstat (limited to 'src/uri-references.cpp')
-rw-r--r--src/uri-references.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/uri-references.cpp b/src/uri-references.cpp
index abe16ec9d..de293716b 100644
--- a/src/uri-references.cpp
+++ b/src/uri-references.cpp
@@ -58,7 +58,7 @@ void URIReference::attach(const URI &uri) throw(BadURIException)
// The path contains references to seperate document files to load.
if(document && uri.getPath()) {
- std::string base = std::string(document->getBase());
+ std::string base = std::string(document->getBase() ? document->getBase() : "");
std::string path = uri.getFullPath(base);
if(!path.empty())
document = document->createChildDoc(path);
@@ -184,3 +184,14 @@ sp_uri_reference_resolve (SPDocument *document, const gchar *uri)
return ref;
}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :