summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2009-12-23 23:04:25 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-12-24 00:26:52 +0200
commit3e1d328e37693761b7d58f55a80612acf89243d3 (patch)
tree7bb80144eef85a35605ea76ecedc0a4726bf521c
parent240723a45d513ac5a9cf4770b457d988717977f4 (diff)
downloadspice-3e1d328e37693761b7d58f55a80612acf89243d3.tar.gz
spice-3e1d328e37693761b7d58f55a80612acf89243d3.tar.xz
spice-3e1d328e37693761b7d58f55a80612acf89243d3.zip
spice: fix server crush in case connecting without qxl device
Signed-off-by: Izik Eidus <ieidus@redhat.com>
-rw-r--r--server/red_dispatcher.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index dae33d87..439d5342 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -405,6 +405,9 @@ int red_dispatcher_count()
uint32_t red_dispatcher_qxl_ram_size()
{
QXLDevInfo qxl_info;
+ if (!dispatchers) {
+ return 0;
+ }
dispatchers->qxl_interface->get_info(dispatchers->qxl_interface, &qxl_info);
return qxl_info.ram_size;
}