(GL) Make driver more resilient in case gl is NULL