Fix segfault on invalid graphics context driver

Last element of gfx_ctx_drivers[] is NULL, don't dereference it.
Merge pull request #1098 from mprobinson/invalid-ctx-segfault

Fix segfault on invalid graphics context driver