Check if context creation was successful before accessing it

It acts as if GL isn't supported (eglCreateContext ends up returning EGL_NO_CONTEXT and setting BAD_MATCH). This used to work before but got broken at some point.