opengles2: Fix static analysis warning. Not clear if this could ever dereference NULL in real life, but better safe than sorry!