From d2dca270678502169036fd44ce6d4c436c500509 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 8 Jun 2014 11:25:10 +0200 Subject: [PATCH] Correct wrong assertions (Fixes #1425) --- apps/openmw/mwgui/quickkeysmenu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/quickkeysmenu.cpp b/apps/openmw/mwgui/quickkeysmenu.cpp index e14217177..eda9daeff 100644 --- a/apps/openmw/mwgui/quickkeysmenu.cpp +++ b/apps/openmw/mwgui/quickkeysmenu.cpp @@ -162,7 +162,7 @@ namespace MWGui void QuickKeysMenu::onAssignItem(MWWorld::Ptr item) { - assert (mSelectedIndex > 0); + assert (mSelectedIndex >= 0); ItemWidget* button = mQuickKeyButtons[mSelectedIndex]; while (button->getChildCount()) // Destroy number label MyGUI::Gui::getInstance().destroyWidget(button->getChildAt(0)); @@ -184,7 +184,7 @@ namespace MWGui void QuickKeysMenu::onAssignMagicItem (MWWorld::Ptr item) { - assert (mSelectedIndex > 0); + assert (mSelectedIndex >= 0); ItemWidget* button = mQuickKeyButtons[mSelectedIndex]; while (button->getChildCount()) // Destroy number label MyGUI::Gui::getInstance().destroyWidget(button->getChildAt(0)); @@ -203,7 +203,7 @@ namespace MWGui void QuickKeysMenu::onAssignMagic (const std::string& spellId) { - assert (mSelectedIndex > 0); + assert (mSelectedIndex >= 0); ItemWidget* button = mQuickKeyButtons[mSelectedIndex]; while (button->getChildCount()) // Destroy number label MyGUI::Gui::getInstance().destroyWidget(button->getChildAt(0));