From 8808f3beea881af5652716c883a21c8031b5e390 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 18 May 2009 16:21:28 +0000 Subject: (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() --- src/group_gui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/group_gui.cpp') diff --git a/src/group_gui.cpp b/src/group_gui.cpp index ca49ff3e5..248025563 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -594,13 +594,13 @@ public: break; } - case GRP_WIDGET_REPLACE_PROTECTION: - if (Group::IsValidID(this->group_sel)) { - const Group *g = Group::Get(this->group_sel); - + case GRP_WIDGET_REPLACE_PROTECTION: { + const Group *g = Group::GetIfValid(this->group_sel); + if (g != NULL) { DoCommandP(0, this->group_sel, !g->replace_protection, CMD_SET_GROUP_REPLACE_PROTECTION); } break; + } } } -- cgit v1.2.3-54-g00ecf