diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-26 20:30:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-26 20:30:22 +0300 |
commit | 6b06a89665fdfa9ecc7179bae827cefae3cb1a77 (patch) | |
tree | d90008a75b6d3d883591ccce196b43c94c3cd67c /src/spellmanager.cpp | |
parent | bcdf34645ff3067d3b4110120b6191af2b0b2e99 (diff) | |
parent | 2ee2f8b060e4fe88feeeba5508189c916e55a70d (diff) | |
download | ManaVerse-stable.tar.gz ManaVerse-stable.tar.bz2 ManaVerse-stable.tar.xz ManaVerse-stable.zip |
Merge branch 'master' into stablestable
Diffstat (limited to 'src/spellmanager.cpp')
-rw-r--r-- | src/spellmanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index b1fad932a..cd4f0f2fd 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -399,6 +399,9 @@ void SpellManager::swap(const int id1, const int id2) { TextCommand *const spell1 = mSpells[id1]; TextCommand *const spell2 = mSpells[id2]; + if (!spell1 || !spell2) + return; + // swap in map mSpells[id1] = spell2; mSpells[id2] = spell1; |