summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/equipmentwindow.cpp6
-rw-r--r--src/gui/setup_players.cpp7
2 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index d646b78c..4d1d5291 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -83,8 +83,7 @@ EquipmentWindow::EquipmentWindow(Equipment *equipment):
void EquipmentWindow::loadEquipBoxes()
{
- if (mEquipBox)
- delete[] mEquipBox;
+ delete[] mEquipBox;
// Load equipment boxes.
mBoxesNumber = mEquipment->getSlotNumber();
@@ -110,8 +109,7 @@ void EquipmentWindow::loadEquipBoxes()
EquipmentWindow::~EquipmentWindow()
{
delete mItemPopup;
- if (mEquipBox)
- delete[] mEquipBox;
+ delete[] mEquipBox;
}
void EquipmentWindow::draw(gcn::Graphics *graphics)
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp
index fe72a29c..529e69a5 100644
--- a/src/gui/setup_players.cpp
+++ b/src/gui/setup_players.cpp
@@ -127,8 +127,8 @@ public:
signalBeforeUpdate();
freeWidgets();
- if (mPlayers)
- delete mPlayers;
+
+ delete mPlayers;
mPlayers = player_relations.getPlayers();
// set up widgets
@@ -162,8 +162,7 @@ public:
virtual void freeWidgets()
{
- if (mPlayers)
- delete mPlayers;
+ delete mPlayers;
mPlayers = nullptr;
delete_all(mWidgets);