[Kst] extragear/graphics/kst/src/libkstapp
George Staikos
staikos at kde.org
Tue Aug 1 08:39:20 CEST 2006
SVN commit 568431 by staikos:
simplify and test for null in cast
M +4 -4 kst.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #568430:568431
@@ -1999,10 +1999,10 @@
}
void KstApp::newPlot() {
- KstViewWindow *w;
- w = dynamic_cast<KstViewWindow*>(activeWindow());
- Kst2DPlotPtr p = kst_cast<Kst2DPlot>(w->view()->findChild(w->createObject<Kst2DPlot>(KST::suggestPlotName(), false)));
-
+ KstViewWindow *w = dynamic_cast<KstViewWindow*>(activeWindow());
+ if (w) {
+ w->createObject<Kst2DPlot>(KST::suggestPlotName(), false);
+ }
}
void KstApp::showPlotDialog(const QString& window, const QString& plot) {
More information about the Kst
mailing list