From 52c7195a8ee91f95ef134d9798a47ea313df16c8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 11 Oct 2013 17:35:24 +0300 Subject: Second part of checks from Parasoft C++ Test. --- src/gui/widgets/spellshortcutcontainer.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/gui/widgets/spellshortcutcontainer.cpp') diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 648a493b1..6e1db9cbd 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -235,13 +235,10 @@ void SpellShortcutContainer::mouseReleased(gcn::MouseEvent &event) { const int oldIndex = dragDrop.getTag(); const int idx = mNumber * SPELL_SHORTCUT_ITEMS; - if (spellManager) - { - spellManager->swap(idx + index, idx + oldIndex); - spellManager->save(); - dragDrop.clear(); - dragDrop.deselect(); - } + spellManager->swap(idx + index, idx + oldIndex); + spellManager->save(); + dragDrop.clear(); + dragDrop.deselect(); } } else -- cgit v1.2.3-70-g09d2