[OGL] Fix a possible null pointer dereference

Note: Not sure if that was intended to check for null or literally check the retrieved value. 

If it was intended to check the value, then a * is missing from the if statement (and I can fix it if that was the intent)