[Mesa-dev] [PATCH] st/mesa: properly handle u_upload_alloc failure
Marek Olšák
maraeo at gmail.com
Sun Sep 6 07:45:18 PDT 2015
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Sat, Sep 5, 2015 at 7:12 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> vbuf is never null. We want to make sure that a resource was allocated
> for the vbuf, which is *vbuf.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/mesa/state_tracker/st_cb_bitmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
> index ce593a9..230eba8 100644
> --- a/src/mesa/state_tracker/st_cb_bitmap.c
> +++ b/src/mesa/state_tracker/st_cb_bitmap.c
> @@ -351,7 +351,7 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
>
> u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]),
> vbuf_offset, vbuf, (void **) &vertices);
> - if (!vbuf) {
> + if (!*vbuf) {
> return;
> }
>
> --
> 2.4.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list