[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kst/portto4/kst/src/widgets
From:       Nicolas Brisset <nicolas.brisset () eurocopter ! com>
Date:       2012-03-18 17:47:18
Message-ID: 20120318174718.DE009AC898 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1286210 by brisset:

Don't crash when the user clicks the "Edit Vector" button and there is no selected \
vector. Barth, please review. Maybe there is a nicer way to do it (like deactivating \
the button when there is no selection?). But at least this seems to work well.

BUG: 295863


 M  +4 -1      vectorselector.cpp  


--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #1286209:1286210
@@ -155,7 +155,10 @@
 
 
 void VectorSelector::editVector() {
-  if (selectedVector()->provider()) {
+  if (!selectedVector()) {
+    return; // Don't crash when the user clicks the Edit vector button and there is \
no selected vector +  }
+  else if (selectedVector()->provider()) {
     DialogLauncher::self()->showObjectDialog(selectedVector()->provider());
   } else {
     QString vectorname;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic