diff --git a/src/video/sdl.cpp b/src/video/sdl.cpp
index 607e97745..3678a5fd3 100644
--- a/src/video/sdl.cpp
+++ b/src/video/sdl.cpp
@@ -197,6 +197,10 @@ static bool IsExtensionSupported(const char *extension)
 	len = strlen(extension);
 	start = extensions;
 	while (true) {
+		if (!start)
+		{
+			return false;
+		}
 		ptr = (GLubyte *)strstr((const char *)start, extension);
 		if (!ptr) {
 			break;