diff options
Diffstat (limited to 'boilerplate')
-rw-r--r-- | boilerplate/cairo-boilerplate-cogl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-cogl.c b/boilerplate/cairo-boilerplate-cogl.c index 037a34147..364654feb 100644 --- a/boilerplate/cairo-boilerplate-cogl.c +++ b/boilerplate/cairo-boilerplate-cogl.c @@ -74,6 +74,11 @@ _cairo_boilerplate_cogl_create_offscreen_color_surface (const char *name, cogl_closure_t *closure; cairo_status_t status; + if (width < 1) + width = 1; + if (height < 1) + height = 1; + if (!context) context = cogl_context_new (NULL, NULL); @@ -118,6 +123,11 @@ _cairo_boilerplate_cogl_create_onscreen_color_surface (const char *name, cogl_closure_t *closure; cairo_status_t status; + if (width < 1) + width = 1; + if (height < 1) + height = 1; + if (!context) context = cogl_context_new (NULL, NULL); |