summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-11 00:12:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-11 00:12:09 +0300
commit4fbb944f132eb886a6f5b350e5a14a4fe380aacf (patch)
tree6df2ed96430610ee7c35a7ca4902bbdade0e8e34 /src/gui/widgets/tabs
parent1dc012a3bb44218778568e8f80c4e9b445802195 (diff)
downloadmanaverse-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.gz
manaverse-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.bz2
manaverse-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.tar.xz
manaverse-4fbb944f132eb886a6f5b350e5a14a4fe380aacf.zip
Add missing checks into gui.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/socialfriendstab.h2
-rw-r--r--src/gui/widgets/tabs/socialnavigationtab.h15
-rw-r--r--src/gui/widgets/tabs/socialplayerstab.h6
3 files changed, 1 insertions, 22 deletions
diff --git a/src/gui/widgets/tabs/socialfriendstab.h b/src/gui/widgets/tabs/socialfriendstab.h
index e09068d8d..5f9038f81 100644
--- a/src/gui/widgets/tabs/socialfriendstab.h
+++ b/src/gui/widgets/tabs/socialfriendstab.h
@@ -74,8 +74,6 @@ class SocialFriendsTab final : public SocialTab
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars)
- return;
std::vector<Avatar*>::iterator ia = avatars->begin();
while (ia != avatars->end())
diff --git a/src/gui/widgets/tabs/socialnavigationtab.h b/src/gui/widgets/tabs/socialnavigationtab.h
index b649f2e2a..b4ad01128 100644
--- a/src/gui/widgets/tabs/socialnavigationtab.h
+++ b/src/gui/widgets/tabs/socialnavigationtab.h
@@ -170,7 +170,7 @@ class SocialNavigationTab final : public SocialTab
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars || avatars->size() <= static_cast<size_t>(num))
+ if (avatars->size() <= static_cast<size_t>(num))
return;
const Avatar *const ava = avatars->at(num);
@@ -184,8 +184,6 @@ class SocialNavigationTab final : public SocialTab
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars)
- return;
const Map *const map = socialWindow->getMap();
if (!map)
@@ -220,9 +218,6 @@ class SocialNavigationTab final : public SocialTab
return -1;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars)
- return -1;
-
const Map *const map = socialWindow->getMap();
if (!map)
return -1;
@@ -255,10 +250,6 @@ class SocialNavigationTab final : public SocialTab
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
-
- if (!avatars)
- return;
-
const MapItem *const portal = map->findPortalXY(x, y);
if (!portal)
return;
@@ -288,10 +279,6 @@ class SocialNavigationTab final : public SocialTab
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
-
- if (!avatars)
- return;
-
std::vector<Avatar*>::iterator i = avatars->begin();
const std::vector<Avatar*>::iterator i_end = avatars->end();
diff --git a/src/gui/widgets/tabs/socialplayerstab.h b/src/gui/widgets/tabs/socialplayerstab.h
index a7634014b..c0310015f 100644
--- a/src/gui/widgets/tabs/socialplayerstab.h
+++ b/src/gui/widgets/tabs/socialplayerstab.h
@@ -119,9 +119,6 @@ class SocialPlayersTab final : public SocialTab
Avatar* findAvatarbyName(const std::string &name)
{
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars)
- return nullptr;
-
Avatar *ava = nullptr;
std::vector<Avatar*>::const_iterator i = avatars->begin();
const std::vector<Avatar*>::const_iterator i_end = avatars->end();
@@ -141,9 +138,6 @@ class SocialPlayersTab final : public SocialTab
void getPlayersAvatars()
{
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (!avatars)
- return;
-
if (actorManager)
{
StringVect names;