r22556 by jghali - fix potential crash when closing doc, reopening a new one, and entering masterpage mode
scribus-commit
scribus-commit at lists.scribus.net
Thu May 24 18:31:13 UTC 2018
Author: jghali
Date: Thu May 24 18:31:13 2018
New Revision: 22556
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22556
Log:
fix potential crash when closing doc, reopening a new one, and entering masterpage mode
Modified:
trunk/Scribus/scribus/ui/pagepalette.cpp
Modified: trunk/Scribus/scribus/ui/pagepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22556&path=/trunk/Scribus/scribus/ui/pagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette.cpp Thu May 24 18:31:13 2018
@@ -118,10 +118,10 @@
void PagePalette::setView(ScribusView *view)
{
- PagePalette_Pages* pageWidget = dynamic_cast<PagePalette_Pages*>(this->currentWidget());
+ PagePalette_Pages* pageWidget = view ? dynamic_cast<PagePalette_Pages*>(this->currentWidget()) : this->pageWidget();
if (pageWidget)
pageWidget->setView(view);
- PagePalette_MasterPages* mpWidget = dynamic_cast<PagePalette_MasterPages*>(this->currentWidget());
+ PagePalette_MasterPages* mpWidget = view ? dynamic_cast<PagePalette_MasterPages*>(this->currentWidget()) : this->masterpageWidget();
if (mpWidget)
mpWidget->setView(view);
m_view = view;
More information about the scribus-commit
mailing list