GLES: Load default shader if we try to load user shader to avoid crash

This commit is contained in:
Emile Belanger 2021-11-21 12:01:42 +00:00 committed by Christoph Oelckers
parent 4530a7b583
commit 54ad3433b1

View file

@ -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];
}
}
};