projects
/
evilplumber
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b0df64
)
Bugfix (segfault when starting a game after finishing all levels).
master
author
Marja Hassinen
<marja2@Vahvero.(none)>
Mon, 11 Jan 2010 18:42:35 +0000
(20:42 +0200)
committer
Marja Hassinen
<marja2@Vahvero.(none)>
Mon, 11 Jan 2010 18:42:35 +0000
(20:42 +0200)
If none of the level collections have un-passed levels, none of them
got selected in the list widget -> trying to do something with the
current item caused a segfault.
src/game.cpp
patch
|
blob
|
history
diff --git
a/src/game.cpp
b/src/game.cpp
index
41bff30
..
6b8aa20
100644
(file)
--- a/
src/game.cpp
+++ b/
src/game.cpp
@@
-594,6
+594,13
@@
void LevelSwitcher::chooseLevelCollection()
first = false;
}
}
+
+ if (first) {
+ // None of the rows got the focus yet; set it to the first
+ // item
+ levelList->setCurrentItem(levelList->item(0));
+ }
+
gameWidget->hide();
startWidget->hide();
levelWidget->show();