Detecting failure to open a context

BlitzMax Forums/BlitzMax Programming/Detecting failure to open a context

I expect you've already tried it like this...
SetGraphicsDriver GLMax2DDriver()
Local Context:TGraphics 
Context = CreateGraphics(640,480,32,60,GRAPHICS_BACKBUFFER)
If Not context
	Context = CreateGraphics(640,480,0,60,GRAPHICS_BACKBUFFER)
	If Not Context
		RuntimeError "Unable to open a graphics context"
	EndIf
EndIf

It works here if I set the screen size to say 1640,480 or something.