summaryrefslogtreecommitdiff
path: root/src/textcommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/textcommand.cpp')
-rw-r--r--src/textcommand.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/textcommand.cpp b/src/textcommand.cpp
index 5e2570f0f..8a5949613 100644
--- a/src/textcommand.cpp
+++ b/src/textcommand.cpp
@@ -110,7 +110,7 @@ TextCommand::TextCommand(const int id) :
TextCommand::~TextCommand()
{
- if (mImage)
+ if (mImage != nullptr)
{
mImage->decRef();
mImage = nullptr;
@@ -119,7 +119,7 @@ TextCommand::~TextCommand()
void TextCommand::loadImage()
{
- if (mImage)
+ if (mImage != nullptr)
{
mImage->decRef();
mImage = nullptr;
@@ -132,6 +132,6 @@ void TextCommand::loadImage()
mImage = Loader::getImage(pathJoin(paths.getStringValue("itemIcons"),
display.image));
- if (!mImage)
+ if (mImage == nullptr)
mImage = Theme::getImageFromTheme("unknown-item.png");
}