index 19655e0a1b42a54eb7acb5724f40865e20021388..b70926947605ea5c8f14a06a5772e67c191c26de 100644 (file)
--- a/src/profile-manager.cpp
+++ b/src/profile-manager.cpp
ProfileManager::~ProfileManager()
{
+ _resource_connection.disconnect();
+ _doc = 0;
}
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() );
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :