summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-01-16 11:11:52 -0500
committerSøren Sandmann <ssp@redhat.com>2012-01-27 10:33:12 -0500
commit57b5d7a1a20fb4f138131e644251d1a49ede94c8 (patch)
tree3366fa936a018d15817996e3f001251e884cf745
parent6acad24a8df389e72c923e02fedd615e56dfe15b (diff)
Return NULL from qxl_surface_create() when surfaces are disabled
-rw-r--r--src/qxl_surface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index 5a26ba6..acb614e 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -688,6 +688,9 @@ qxl_surface_create (surface_cache_t * cache,
{
qxl_surface_t *surface;
+ if (!cache->qxl->enable_surfaces)
+ return NULL;
+
if ((bpp & 3) != 0)
{
ErrorF (" Bad bpp: %d (%d)\n", bpp, bpp & 7);