r13973 by fschmid - Fixed potential crashes by more error checking.
scribus-commit
scribus-commit at lists.scribus.net
Mon Sep 7 22:25:16 CEST 2009
Revision: 13973
Author: fschmid
Date: 2009-09-07T20:22:50.777301Z
Commit message: Fixed potential crashes by more error checking.
Changeset:
M /trunk/Scribus/scribus/scribus.cpp
Diffs:
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 13972)
+++ scribus/scribus.cpp (revision 13973)
@@ -2417,12 +2417,18 @@
ActWin = NULL;
return;
}
+ if (w->widget() == NULL)
+ return;
if (doc!=0 && doc->appMode == modeEditClip)
view->requestMode(submodeEndNodeEdit);
- ScribusWin* scw = (ScribusWin*)w->widget();
+ ScribusWin* scw = dynamic_cast<ScribusWin *>(w->widget());
+ if (!scw)
+ return;
if (scw && scw->doc())
+ {
if (!scw->doc()->hasGUI())
return;
+ }
ActWin = scw;
if (ActWin->doc()==NULL)
return;
More information about the scribus-commit
mailing list