r18566 by craig - #11796: Avoid crash if plugin has no menu

scribus-commit scribus-commit at lists.scribus.net
Sat Oct 19 15:20:11 UTC 2013


Author: craig
Date: Sat Oct 19 15:20:11 2013
New Revision: 18566

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18566
Log:
#11796: Avoid crash if plugin has no menu

Modified:
    trunk/Scribus/scribus/ui/prefs_plugins.cpp

Modified: trunk/Scribus/scribus/ui/prefs_plugins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18566&path=/trunk/Scribus/scribus/ui/prefs_plugins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_plugins.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_plugins.cpp Sat Oct 19 15:20:11 2013
@@ -61,7 +61,11 @@
 					men = scMW->scrMenuMgr->getLocalPopupMenu(ai.parentMenu)->title().remove(QRegExp("&(?!&)")) + " -> ";
 			}
 			if (scMW->scrMenuMgr->menuExists(ai.menu))
-				men += scMW->scrMenuMgr->getLocalPopupMenu(ai.menu)->title().remove(QRegExp("&(?!&)")) + " -> ";
+			{
+				QMenu *m=scMW->scrMenuMgr->getLocalPopupMenu(ai.menu);
+				if (m)
+					men += m->title().remove(QRegExp("&(?!&)")) + " -> ";
+			}
 			i1->setText(men + QString("%1").arg(scMW->scrActions[ai.name]->text().remove(QRegExp("&(?!&)"))));
 		}
 		pluginTable->setItem(i, 1, i1);




More information about the scribus-commit mailing list