Bug 1048 - SIGFPE in cogl_texture_set_region() with nvidia

* clutter/cogl/gl/cogl-texture.c (cogl_texture_set_region):
	* clutter/cogl/gles/cogl-texture.c (cogl_texture_set_region):
	Don't attempt to upload any data if the width or height of the
	subregion is zero. Thanks to Gwenole Beauchesne.
This commit is contained in:
Neil Roberts 2008-09-18 13:16:15 +00:00
parent 76faa8c7a6
commit 50a248764c
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2008-09-18 Neil Roberts <neil@linux.intel.com>
Bug 1048 - SIGFPE in cogl_texture_set_region() with nvidia
* clutter/cogl/gl/cogl-texture.c (cogl_texture_set_region):
* clutter/cogl/gles/cogl-texture.c (cogl_texture_set_region):
Don't attempt to upload any data if the width or height of the
subregion is zero. Thanks to Gwenole Beauchesne.
2008-09-18 Neil Roberts <neil@linux.intel.com>
Bug 1044 - cogl_get_viewport error

View File

@ -1552,6 +1552,10 @@ cogl_texture_set_region (CoglHandle handle,
if (format == COGL_PIXEL_FORMAT_ANY)
return FALSE;
/* Shortcut out early if the image is empty */
if (width == 0 || height == 0)
return TRUE;
/* Init source bitmap */
source_bmp.width = width;
source_bmp.height = height;

View File

@ -1558,6 +1558,10 @@ cogl_texture_set_region (CoglHandle handle,
if (format == COGL_PIXEL_FORMAT_ANY)
return FALSE;
/* Shortcut out early if the image is empty */
if (width == 0 || height == 0)
return TRUE;
/* Init source bitmap */
source_bmp.width = width;
source_bmp.height = height;