summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index b430dfebb..c99f46149 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -229,7 +229,7 @@ Button::~Button()
if (mImages)
{
for (int f = 0; f < BUTTON_COUNT; f ++)
- mImages[f] = 0;
+ mImages[f] = nullptr;
delete [] mImages;
mImages = nullptr;
}
@@ -366,7 +366,6 @@ void Button::draw(gcn::Graphics *graphics)
case gcn::Graphics::CENTER:
if (mImages)
{
- textX = getWidth() / 2;
int width = getFont()->getWidth(mCaption) + mImageWidth + 2;
imageX = getWidth() / 2 - width / 2;
textX = imageX + mImageWidth + 2;