[Kst] branches/work/kst/portto4/kst/src/widgets
Nicolas Brisset
nicolas.brisset at eurocopter.com
Sun Mar 18 17:47:18 UTC 2012
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;
More information about the Kst
mailing list