summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-06-05 17:53:09 +0300
committerAlon Levy <alevy@redhat.com>2011-06-20 12:19:24 +0200
commit89046ba1db35694d26ea89ee5d2be1988eefcec3 (patch)
tree121d858cb7b7aa7ef1c7180c99366d4956df02bc
parent61f077b5d42587a639ac4c4babaa2f504a044bf2 (diff)
display/driver: DebugPrintV: check for pdev->Res before dereferencing it
-rw-r--r--display/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/display/driver.c b/display/driver.c
index 47336de..20d3699 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -107,7 +107,7 @@ static CallCounterInfo counters_info[NUM_CALL_COUNTERS] = {
void DebugPrintV(PDev *pdev, const char *message, va_list ap)
{
- if (pdev && pdev->log_buf) {
+ if (pdev && pdev->log_buf && pdev->Res) {
EngAcquireSemaphore(pdev->Res->print_sem);
_snprintf(pdev->log_buf, QXL_LOG_BUF_SIZE, QXLDD_DEBUG_PREFIX);
_vsnprintf(pdev->log_buf + strlen(QXLDD_DEBUG_PREFIX),