index 19655e0a1b42a54eb7acb5724f40865e20021388..1cd965e390b526d89318918dd7569dfdaec4a049 100644 (file)
--- a/src/profile-manager.cpp
+++ b/src/profile-manager.cpp
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() );