unbind VAO if NULL buffer specified

This commit is contained in:
jp9000 2013-11-15 07:07:03 -07:00
parent 41bef32962
commit 10e917efee

View file

@ -260,8 +260,10 @@ bool vertexbuffer_load(device_t device, vertbuffer_t vb)
return true;
device->cur_vertex_buffer = vb;
if (!device->cur_vertex_shader || !vb)
if (!device->cur_vertex_shader || !vb) {
gl_bind_vertex_array(0);
return true;
}
if (!load_vb_buffers(device->cur_vertex_shader, vb))
return false;