mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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:
parent
3ae77fbfb7
commit
238e9c3a1a
@ -1552,6 +1552,10 @@ cogl_texture_set_region (CoglHandle handle,
|
|||||||
if (format == COGL_PIXEL_FORMAT_ANY)
|
if (format == COGL_PIXEL_FORMAT_ANY)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* Shortcut out early if the image is empty */
|
||||||
|
if (width == 0 || height == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* Init source bitmap */
|
/* Init source bitmap */
|
||||||
source_bmp.width = width;
|
source_bmp.width = width;
|
||||||
source_bmp.height = height;
|
source_bmp.height = height;
|
||||||
|
@ -1558,6 +1558,10 @@ cogl_texture_set_region (CoglHandle handle,
|
|||||||
if (format == COGL_PIXEL_FORMAT_ANY)
|
if (format == COGL_PIXEL_FORMAT_ANY)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* Shortcut out early if the image is empty */
|
||||||
|
if (width == 0 || height == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* Init source bitmap */
|
/* Init source bitmap */
|
||||||
source_bmp.width = width;
|
source_bmp.width = width;
|
||||||
source_bmp.height = height;
|
source_bmp.height = height;
|
||||||
|
Loading…
Reference in New Issue
Block a user