From 0ddf06ff5c6d5991a8d5906acd6e0b687211c47c Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Fri, 26 Jun 2015 15:14:50 -0600 Subject: layers: Abort logging if null debug_report ptr If a layer were to only be enabled on the device chain it would not have had a chance to allocate a debug_report data structure. Just treat such cases as having debug_report disabled. --- layers/layer_logging.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/layer_logging.h b/layers/layer_logging.h index 9370abd5..bcae4d90 100644 --- a/layers/layer_logging.h +++ b/layers/layer_logging.h @@ -226,7 +226,7 @@ static inline void log_msg( const char* format, ...) { - if (!(debug_data->active_flags & msgFlags)) { + if (!debug_data || !(debug_data->active_flags & msgFlags)) { /* message is not wanted */ return; } -- cgit v1.2.3