Skip to content

Commit ac3effe

Browse files
committed
fix: refine safe mode restrictions for feature cvars
Updated the safe mode restrictions to only apply if the cvar was successfully created. This change ensures that safe mode behavior is correctly enforced without affecting the registration of features that may not have valid cvars. This improves the robustness of feature management in the renderer.
1 parent 3597f40 commit ac3effe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/renderers/renderer_features.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ void R_RegisterFeatureCvars(const renderer_feature_t *features, int count) {
9494
Cvar_SetDescription(cvar, feature->description);
9595
}
9696

97-
// Apply safe mode restrictions
98-
if (g_safe_mode.enabled) {
97+
// Apply safe mode restrictions (only if cvar was successfully created)
98+
if (cvar && g_safe_mode.enabled) {
9999
const char *safe_value = NULL;
100100

101101
if (feature->category == FEATURE_EXPERIMENTAL && g_safe_mode.disable_experimental) {

0 commit comments

Comments
 (0)