[Spice-devel,xf86,qxl,driver,3/5] qxl_driver: check_crtc: handle qxl->crtcs == NULL

Submitted by Uri Lublin on Jan. 17, 2013, 2:26 p.m.

Details

Message ID 83f80d69e8a6cfc3c9572d757fd117c790aa28cf.1358430965.git.uril@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Uri Lublin Jan. 17, 2013, 2:26 p.m.
---
 src/qxl_driver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 1a253d2..d8abb7b 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1040,6 +1040,10 @@  check_crtc (qxl_screen_t *qxl)
     int i, count = 0;
     xf86CrtcPtr crtc;
     
+    if (qxl->crtcs == NULL) {
+        return 0;
+    }
+
     for (i = 0 ; i < qxl->num_heads; ++i)
     {
 	crtc = qxl->crtcs[i];