summaryrefslogtreecommitdiffstats
path: root/src/profile-manager.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-12-05 08:58:23 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-12-05 08:58:23 +0000
commitae799e60c5576baa6d954124566edade4a5b1b7d (patch)
tree84195d177929d776c3483cff1687a8b04dbbd971 /src/profile-manager.cpp
parentGNU/Linux! (diff)
downloadinkscape-ae799e60c5576baa6d954124566edade4a5b1b7d.tar.gz
inkscape-ae799e60c5576baa6d954124566edade4a5b1b7d.zip
Avoid problems when document is being closed.
(bzr r6950)
Diffstat (limited to 'src/profile-manager.cpp')
-rw-r--r--src/profile-manager.cpp10
1 files changed, 6 insertions, 4 deletions
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<SPObject*> 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() );