diff options
Diffstat (limited to 'src/gui/models/playertablemodel.cpp')
-rw-r--r-- | src/gui/models/playertablemodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<signed>(mPlayers->size())) - return ""; + if (!mPlayers || index < 0 + || index >= static_cast<signed>(mPlayers->size())) + { + return std::string(); + } return (*mPlayers)[index]; } |