diff --git a/src/common/rendering/gles/gles_shader.h b/src/common/rendering/gles/gles_shader.h index 66fcb1ebd5..b9c98fb6e7 100644 --- a/src/common/rendering/gles/gles_shader.h +++ b/src/common/rendering/gles/gles_shader.h @@ -480,7 +480,10 @@ public: { return mMaterialShaders[eff]; } - return NULL; + else // This can happen if we try and active a user shader which is not loaded, so return default shader so it does not crash + { + return mMaterialShaders[0]; + } } };