Fix crash when detecting SIMD
diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c
index 2916e34..a40fe7f 100644
--- a/src/cpuinfo/SDL_cpuinfo.c
+++ b/src/cpuinfo/SDL_cpuinfo.c
@@ -362,8 +362,10 @@ CPU_haveARMSIMD(void)
if (aux.a_type == AT_PLATFORM)
{
const char *plat = (const char *) aux.a_un.a_val;
- arm_simd = strncmp(plat, "v6l", 3) == 0 ||
- strncmp(plat, "v7l", 3) == 0;
+ if (plat) {
+ arm_simd = strncmp(plat, "v6l", 3) == 0 ||
+ strncmp(plat, "v7l", 3) == 0;
+ }
}
}
close(fd);