author | drw <drw> | 2002-12-20 02:17:55 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-20 02:17:55 (UTC) |
commit | 9328bf79f49294e14c1753c9ee17ddd2985c1969 (patch) (side-by-side diff) | |
tree | b0c9fa3e990b45cbfc9fb7fb33da73b9f6477df9 | |
parent | 3e556ed5f8c8b1236b9c6155b609930103d17b21 (diff) | |
download | opie-9328bf79f49294e14c1753c9ee17ddd2985c1969.zip opie-9328bf79f49294e14c1753c9ee17ddd2985c1969.tar.gz opie-9328bf79f49294e14c1753c9ee17ddd2985c1969.tar.bz2 |
Fix to prevent segfault when no process/module is selected in list.
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 8b58fe9..29cce90 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp @@ -123,4 +123,9 @@ void ModulesInfo::updateData() void ModulesInfo::slotSendClicked() { + if ( !ModulesView->currentItem() ) + { + return; + } + QString capstr = tr( "You really want to execute\n" ); capstr.append( CommandCB->currentText() ); diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 35d7ba1..9a5446a 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp @@ -145,9 +145,14 @@ void ProcessInfo::updateData() void ProcessInfo::slotSendClicked() { + QListViewItem *currprocess = ProcessView->currentItem(); + if ( !currprocess ) + { + return; + } + QString capstr = tr( "You really want to send\n" ); capstr.append( SignalCB->currentText() ); capstr.append( "\nto this process?" ); - QListViewItem *currprocess = ProcessView->currentItem(); if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, |