diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_main.c | 3 | ||||
-rw-r--r-- | src/ui/ui_shared.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 1c223033..a96d9a71 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -1575,6 +1575,9 @@ static void UI_DrawInfoPane( tremInfoPane_t *pane, rectDef_t *rect, float text_x textItem.textscale = scale; textItem.textStyle = textStyle; + textItem.enableCvar = NULL; + textItem.cvarTest = NULL; + //hack to utilise existing autowrap code Item_Text_AutoWrapped_Paint( &textItem ); } 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)); } |