mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
added paranoid NULL check
This commit is contained in:
parent
662b473e9f
commit
9894f48fb0
@ -93,10 +93,10 @@ static uint32_t gl_core_get_cross_compiler_target_version()
|
||||
unsigned patch = 0;
|
||||
|
||||
#ifdef HAVE_OPENGLES3
|
||||
if (version && sscanf(version, "OpenGL ES %u.%u.%u", &major, &minor, &patch) < 2)
|
||||
if (!version || sscanf(version, "OpenGL ES %u.%u.%u", &major, &minor, &patch) < 2)
|
||||
return 300u;
|
||||
#else
|
||||
if (version && sscanf(version, "%u.%u.%u", &major, &minor, &patch) < 2)
|
||||
if (!version || sscanf(version, "%u.%u.%u", &major, &minor, &patch) < 2)
|
||||
return 150u;
|
||||
#endif
|
||||
if (major == 3u && minor == 2u)
|
||||
|
Loading…
x
Reference in New Issue
Block a user