From d2e02bed6c128ec055eaa3a32aaca6ce5523576d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 16 May 2014 12:11:38 +0300 Subject: Fix code style. --- src/gui/models/playertablemodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/models/playertablemodel.cpp') diff --git a/src/gui/models/playertablemodel.cpp b/src/gui/models/playertablemodel.cpp index d3d198eb1..119a4fba8 100644 --- a/src/gui/models/playertablemodel.cpp +++ b/src/gui/models/playertablemodel.cpp @@ -25,14 +25,11 @@ #include "gui/widgets/dropdown.h" #include "gui/widgets/label.h" -#include "gui/widgets/tabs/setup_relations.h" - #include "gui/models/playerrelationlistmodel.h" #include "gui/models/tablemodel.h" #include "utils/delete2.h" #include "utils/dtor.h" -#include "utils/gettext.h" #include "debug.h" @@ -145,7 +142,10 @@ void PlayerTableModel::freeWidgets() std::string PlayerTableModel::getPlayerAt(const int index) const { - if (index < 0 || index >= static_cast(mPlayers->size())) - return ""; + if (!mPlayers || index < 0 + || index >= static_cast(mPlayers->size())) + { + return std::string(); + } return (*mPlayers)[index]; } -- cgit v1.2.3-60-g2f50