Преглед изворни кода

util: handle failed mapping in u_upload_alloc()

Reviewed-by: José Fonseca <jfonseca@vmware.com>
tags/mesa-8.0-rc1
Brian Paul пре 14 година
родитељ
комит
9dc7df1fea
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5
    0
      src/gallium/auxiliary/util/u_upload_mgr.c

+ 5
- 0
src/gallium/auxiliary/util/u_upload_mgr.c Прегледај датотеку

@@ -187,6 +187,11 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
PIPE_TRANSFER_FLUSH_EXPLICIT |
PIPE_TRANSFER_UNSYNCHRONIZED,
&upload->transfer);
if (!upload->map) {
pipe_resource_reference(outbuf, NULL);
*ptr = NULL;
return PIPE_ERROR_OUT_OF_MEMORY;
}
}

assert(offset < upload->buffer->width0);

Loading…
Откажи
Сачувај