summaryrefslogtreecommitdiff
path: root/src/keyboardconfig.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 16:36:34 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-10 16:36:34 -0600
commit7af746a8ce0c64932923419c5a35a25a5b8c4005 (patch)
treec26b37811a9347efecc948fe4f048b51ded50415 /src/keyboardconfig.cpp
parente2e30710a646965a506444cc0dc8a91e1a718002 (diff)
downloadmana-client-7af746a8ce0c64932923419c5a35a25a5b8c4005.tar.gz
mana-client-7af746a8ce0c64932923419c5a35a25a5b8c4005.tar.bz2
mana-client-7af746a8ce0c64932923419c5a35a25a5b8c4005.tar.xz
mana-client-7af746a8ce0c64932923419c5a35a25a5b8c4005.zip
Delete local player earlier and fix a rare crash
Rare crash is in KeyboardConfig, where the active keys array is accessed before it's initialized. Also remove some debug prints that made it into a previous commit.
Diffstat (limited to 'src/keyboardconfig.cpp')
-rw-r--r--src/keyboardconfig.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp
index 73c0fe0a..06ce4ac7 100644
--- a/src/keyboardconfig.cpp
+++ b/src/keyboardconfig.cpp
@@ -197,6 +197,7 @@ int KeyboardConfig::getKeyEmoteOffset(int keyValue) const
bool KeyboardConfig::isKeyActive(int index)
{
+ if (!mActiveKeys) return false;
return mActiveKeys[mKey[index].value];
}