From ae7f7f7449a2da248ff13119e802a104de297c3d Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 22 Jan 2014 18:06:39 -0500 Subject: Improve warnings for missing files. Don't just assert bolocks to the user. (bzr r12972) --- src/uri-references.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/uri-references.cpp') diff --git a/src/uri-references.cpp b/src/uri-references.cpp index 1684c6ade..f2df55213 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -61,7 +61,10 @@ void URIReference::attach(const URI &uri) throw(BadURIException) if(path && document != NULL) { document = document->createChildDoc(path); } - g_return_if_fail(document != NULL); + if(!document) { + g_warning("Can't get document for referenced URI: %s", uri.toString()); + return; + } gchar const *fragment = uri.getFragment(); if ( !uri.isRelative() || uri.getQuery() || !fragment ) { -- cgit v1.2.3