summaryrefslogtreecommitdiff
path: root/src/gui/ministatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r--src/gui/ministatus.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index 0fdf59b1..f3a8b807 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -92,11 +92,9 @@ MiniStatusWindow::MiniStatusWindow():
void MiniStatusWindow::setIcon(int index, AnimatedSprite *sprite)
{
if (index >= (int) mIcons.size())
- mIcons.resize(index + 1, NULL);
-
- if (mIcons[index])
- delete mIcons[index];
+ mIcons.resize(index + 1);
+ delete mIcons[index];
mIcons[index] = sprite;
}