diff options
author | Yexo <yexo@openttd.org> | 2009-01-23 18:40:18 +0000 |
---|---|---|
committer | Yexo <yexo@openttd.org> | 2009-01-23 18:40:18 +0000 |
commit | c5332eb161944baeaea4667a9794cf1f60722c6e (patch) | |
tree | fcab3d172bfa65fc618d06c466063b69deb22cf6 | |
parent | a3dc092ebcb2ed50f4208445120c2ace88d863d1 (diff) | |
download | openttd-c5332eb161944baeaea4667a9794cf1f60722c6e.tar.xz |
(svn r15234) -Fix (r15176): Crash if you pressed space in the content download window before selecting an item.
-rw-r--r-- | src/network/network_content_gui.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 2497c5a38..c5ccd933b 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -573,9 +573,11 @@ public: break; case WKC_SPACE: - _network_content_client.ToggleSelectedState(this->selected); - this->content.ForceResort(); - this->SetDirty(); + if (this->selected != NULL) { + _network_content_client.ToggleSelectedState(this->selected); + this->content.ForceResort(); + this->SetDirty(); + } return ES_HANDLED; default: return ES_NOT_HANDLED; |