mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
gallium/util: check callback pointers for non-null in pipe_debug_message()
So the callers don't have to do it. v2: also check cb!=NULL in the macro Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
b19546abf3
commit
5effc3ae74
1 changed files with 5 additions and 3 deletions
|
|
@ -268,9 +268,11 @@ void _debug_assert_fail(const char *expr,
|
|||
*/
|
||||
#define pipe_debug_message(cb, type, fmt, ...) do { \
|
||||
static unsigned id = 0; \
|
||||
_pipe_debug_message(cb, &id, \
|
||||
PIPE_DEBUG_TYPE_ ## type, \
|
||||
fmt, ##__VA_ARGS__); \
|
||||
if ((cb) && (cb)->debug_message) { \
|
||||
_pipe_debug_message(cb, &id, \
|
||||
PIPE_DEBUG_TYPE_ ## type, \
|
||||
fmt, ##__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
struct pipe_debug_callback;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue