st/mesa: add null pointer checking in query object functions
authorBrian Paul <brianp@vmware.com>
Mon, 24 Mar 2014 23:17:34 +0000 (17:17 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Mar 2014 16:31:13 +0000 (10:31 -0600)
commit488d4c482637af4b0ab25a3b0e664795164fe819
treeebd3a04a9181f0dfe000dcc24cf4f49234f319c1
parent82246f793980204cd68240b2bc2b2b3cb7ed7d3d
st/mesa: add null pointer checking in query object functions

Don't pass null query object pointers into gallium functions.
This avoids segfaulting in the VMware driver (and others?) if the
pipe_context::create_query() call fails and returns NULL.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/state_tracker/st_cb_queryobj.c