This was an issue for Cycles. This also makes the `GPU_bgl*` functions less fragile by checking for null pointers.