From: joncruz Date: Fri, 5 Dec 2008 08:58:23 +0000 (+0000) Subject: Avoid problems when document is being closed. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=177089acbcef5892c724ef4cae93c1e6e501302d;p=inkscape.git Avoid problems when document is being closed. --- diff --git a/src/profile-manager.cpp b/src/profile-manager.cpp index 19655e0a1..1cd965e39 100644 --- a/src/profile-manager.cpp +++ b/src/profile-manager.cpp @@ -28,10 +28,12 @@ ProfileManager::~ProfileManager() void ProfileManager::_resourcesChanged() { std::vector newList; - const GSList *current = sp_document_get_resource_list( _doc, "iccprofile" ); - while ( current ) { - newList.push_back(SP_OBJECT(current->data)); - current = g_slist_next(current); + if (_doc) { + const GSList *current = sp_document_get_resource_list( _doc, "iccprofile" ); + while ( current ) { + newList.push_back(SP_OBJECT(current->data)); + current = g_slist_next(current); + } } sort( newList.begin(), newList.end() );