diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-16 12:11:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-16 12:11:38 +0300 |
commit | d2e02bed6c128ec055eaa3a32aaca6ce5523576d (patch) | |
tree | 1b0c5ada01c953f7cc82de4c742d783917632510 /src/gui/models/playertablemodel.cpp | |
parent | e5a14c0a1c74b66246f7c54e56c7cc2c33fef29d (diff) | |
download | manaplus-d2e02bed6c128ec055eaa3a32aaca6ce5523576d.tar.gz manaplus-d2e02bed6c128ec055eaa3a32aaca6ce5523576d.tar.bz2 manaplus-d2e02bed6c128ec055eaa3a32aaca6ce5523576d.tar.xz manaplus-d2e02bed6c128ec055eaa3a32aaca6ce5523576d.zip |
Fix code style.
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]; } |