Bug 86588 - Right-clicking on blank area in data manager causes crash
Summary: Right-clicking on blank area in data manager causes crash
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-04 19:13 UTC by Rick Chern
Modified: 2004-08-04 19:23 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-04 19:13:02 UTC
Version:           0.99-devel (using KDE KDE 3.2.1)
Installed from:    RedHat RPMs
Compiler:          gcc (GCC) 3.3.2 20031022 
OS:                Linux

Right-clicking on a blank area in the data manager list causes a crash.

How to reproduce:
- start kst
- optionally create/load some data objects
- open the data manager
- right-click on any blank area in the data object list

Kst crashes: 
Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1084459424 (LWP 6773)]
[New Thread -1087435856 (LWP 6774)]
0x00629c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#0  0x00629c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x008d598b in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#2  0x001e56fc in KCrash::defaultCrashHandler(int) ()
   from /usr/lib/libkdecore.so.4


Expected behaviour:
kst does not crash.
Comment 1 Rick Chern 2004-08-04 19:23:33 UTC
CVS commit by rchern: 

Bug 86588


  M +5 -0      kstdatamanager_i.cpp   1.69


--- kdeextragear-2/kst/kst/kstdatamanager_i.cpp  #1.68:1.69
@@ -503,4 +503,9 @@ void KstDataManagerI::delete_I() {
 void KstDataManagerI::contextMenu(QListViewItem *i, const QPoint& p, int col) {
   Q_UNUSED(col)
+
+  if (!i) {
+    return;
+  }
+  
   KstObjectItem *koi = static_cast<KstObjectItem*>(i);
   KstBaseCurvePtr c;