Bug 87384 - Crash when clicking "Cancel" on new window name dialog from plot dialog
Summary: Crash when clicking "Cancel" on new window name dialog from plot dialog
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Rick Chern
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-17 21:02 UTC by Rick Chern
Modified: 2004-08-17 21:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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);