mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +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;
|
unsigned patch = 0;
|
||||||
|
|
||||||
#ifdef HAVE_OPENGLES3
|
#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;
|
return 300u;
|
||||||
#else
|
#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;
|
return 150u;
|
||||||
#endif
|
#endif
|
||||||
if (major == 3u && minor == 2u)
|
if (major == 3u && minor == 2u)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user