r300g: fix crash while binding a NULL constant buffer

This commit is contained in:
Marek Olšák 2013-03-21 19:29:29 +01:00
parent 92855bcc95
commit 53228fe2a8

View file

@ -2056,7 +2056,7 @@ static void r300_set_constant_buffer(struct pipe_context *pipe,
struct r300_constant_buffer *cbuf;
uint32_t *mapped;
if (!cb)
if (!cb || (!cb->buffer && !cb->user_buffer))
return;
switch (shader) {