Check is context avaible

So that it wont try to swapbuffers or clear if it isnt