summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp8
1 files changed, 4 insertions, 4 deletions
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;
+ }
}
}