summaryrefslogtreecommitdiff
path: root/src/ui/ui_shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_shared.c')
-rw-r--r--src/ui/ui_shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index f03fb82e..e17416bb 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -2813,7 +2813,7 @@ void Item_TextColor(itemDef_t *item, vec4_t *newColor) {
// items can be enabled and disabled based on cvars
}
- if (item->enableCvar && *item->enableCvar && item->cvarTest && *item->cvarTest) {
+ if (item->enableCvar != NULL && *item->enableCvar && item->cvarTest != NULL && *item->cvarTest) {
if (item->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(item, CVAR_ENABLE)) {
memcpy(newColor, &parent->disableColor, sizeof(vec4_t));
}