summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <ssp@redhat.com>2012-02-09 16:51:56 -0500
committerSøren Sandmann <ssp@redhat.com>2012-02-09 16:52:27 -0500
commitc5ab0b538bd437e5e4aa86678d12a676c6edd1e8 (patch)
tree6bec6690ba356388719baae60d14338312fcf261
parent1a371d76e32b2b3612e37ae15684632c987699b7 (diff)
Move check for zero width/height surfaces to qxl_surface_create()
-rw-r--r--src/qxl_surface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qxl_surface.c b/src/qxl_surface.c
index c2c5bdb..5cb7ec1 100644
--- a/src/qxl_surface.c
+++ b/src/qxl_surface.c
@@ -605,12 +605,6 @@ retry:
goto retry;
}
- if (width == 0 || height == 0)
- {
- ErrorF (" Zero width or height\n");
- return NULL;
- }
-
width = align (width);
height = align (height);
@@ -715,6 +709,12 @@ qxl_surface_create (surface_cache_t * cache,
return NULL;
}
+ if (width == 0 || height == 0)
+ {
+ ErrorF (" Zero width or height\n");
+ return NULL;
+ }
+
if (!(surface = surface_get_from_cache (cache, width, height, bpp)))
if (!(surface = surface_send_create (cache, width, height, bpp)))
return NULL;