[Spice-devel] [PATCH qxl-win v3 4/8] display/driver: DebugPrint: check for log_level being set (allow using DebugPrint with pdev early)

Alon Levy alevy at redhat.com
Mon Jun 20 06:08:24 PDT 2011


---
 display/driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/display/driver.c b/display/driver.c
index 871aecb..6bc0830 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -123,7 +123,7 @@ void DebugPrint(PDev *pdev, int level, const char *message, ...)
 {
     va_list ap;
 
-    if (level > (pdev ? (int)*pdev->log_level : DBG_LEVEL)) {
+    if (level > (pdev && pdev->log_level ? (int)*pdev->log_level : DBG_LEVEL)) {
         return;
     }
     va_start(ap, message);
-- 
1.7.5.4



More information about the Spice-devel mailing list