r15961 by jghali - #9514 (better fix) : Potential crash in style manager after closing doc

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 23 01:29:44 CET 2010


Author: jghali
Date: Tue Nov 23 00:29:43 2010
New Revision: 15961

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15961
Log:
#9514 (better fix) : Potential crash in style manager after closing doc

Modified:
    branches/Version135/Scribus/scribus/stylemanager.cpp

Modified: branches/Version135/Scribus/scribus/stylemanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15961&path=/branches/Version135/Scribus/scribus/stylemanager.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/stylemanager.cpp (original)
+++ branches/Version135/Scribus/scribus/stylemanager.cpp Tue Nov 23 00:29:43 2010
@@ -193,8 +193,6 @@
 	bool hasDoc = (doc != NULL);
 	if (m_doc && (m_doc != doc))
 		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(slotDocSelectionChanged()));
-	if (m_doc != doc)
-		m_selectedStyleAction = 0;
 	m_doc = doc;
 	newButton->setEnabled(hasDoc);
 	cloneButton->setEnabled(hasDoc);
@@ -207,6 +205,7 @@
 
 	// clear the style list and reload from new doc
 	styleView->clear();
+	m_selectedStyleAction = 0;
 	m_styleActions.clear();
 	for (int i = 0; i < m_items.count(); ++i)
 	{




More information about the scribus-commit mailing list