From 2fa48450c79a27cdd923faa690e5e8e772ae4dad Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 2 Jun 2015 09:15:09 +0100 Subject: [PATCH] sna: Avoid using NULL pointer inside DBG When pretty printing the format for DBG, make sure it is not NULL! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90725#c32 Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 9e945f01..6ee40336 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -1559,11 +1559,12 @@ skip_glyph: } } + assert(format); + DBG(("%s: format=%08d, depth=%d\n", + __FUNCTION__, format->format, format->depth)); out: if (list_extents != stack_extents) free(list_extents); - DBG(("%s: format=%08d, depth=%d\n", - __FUNCTION__, format->format, format->depth)); return format; }