Bug 87384

Summary: Crash when clicking "Cancel" on new window name dialog from plot dialog
Product: [Applications] kst Reporter: Rick Chern <rchern>
Component: generalAssignee: Rick Chern <rchern>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Rick Chern 2004-08-17 21:02:04 UTC
Version:           1.0.0_devel (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.3.2 20031022  
OS:                Linux

How to reproduce:

- start kst
- go to Plots->Edit Plot...
- optionally fill in some info for a new plot
- click Apply as New 
- when prompted for the window name, click Cancel

Kst crashes.

Expected Behaviour:
Kst returns to plot dialog without crashing
Comment 1 Rick Chern 2004-08-17 21:03:17 UTC
CVS commit by rchern: 

If creation of new window is cancelled when creating a new plot, do not continue creating the plot.

CCMAIL: 87384-done@bugs.kde.org


  M +3 -0      kstplotdialog_i.cpp   1.79


--- kdeextragear-2/kst/kst/kstplotdialog_i.cpp  #1.78:1.79
@@ -526,4 +526,7 @@ void KstPlotDialogI::new_I() {
   if (!c) {
     QString name = KstApp::inst()->newWindow();
+    if (name.isEmpty()) {
+      return;
+    }
     c = KstApp::inst()->findWindow(name);
     _window->insertItem(name);