- fixed: If GLRenderer is uninitialized (i.e. using software renderer, or during startup), gl_paltonemap_* CVARs would crash the game.

This commit is contained in:
Rachael Alexanderson 2017-01-28 00:13:27 -05:00 committed by Christoph Oelckers
parent 13c6d16905
commit c923f8c5e1

View file

@ -135,11 +135,13 @@ CUSTOM_CVAR(Float, gl_ssao_exponent, 1.8f, 0)
CUSTOM_CVAR(Float, gl_paltonemap_powtable, 2.0f, CVAR_ARCHIVE | CVAR_NOINITCALL) CUSTOM_CVAR(Float, gl_paltonemap_powtable, 2.0f, CVAR_ARCHIVE | CVAR_NOINITCALL)
{ {
if (GLRenderer)
GLRenderer->ClearTonemapPalette(); GLRenderer->ClearTonemapPalette();
} }
CUSTOM_CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE | CVAR_NOINITCALL) CUSTOM_CVAR(Bool, gl_paltonemap_reverselookup, true, CVAR_ARCHIVE | CVAR_NOINITCALL)
{ {
if (GLRenderer)
GLRenderer->ClearTonemapPalette(); GLRenderer->ClearTonemapPalette();
} }