mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
Declare the EnumValues for PixelFormat static
Bug 1473 - CoglPixelFormat enum data must be declared static When registering an enumeration GType, the GEnumValue or GFlagsValue arrays must be declared static; otherwise, you get a segmentation fault when calling the function again. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
3409a941a4
commit
eaf202c886
@ -122,7 +122,7 @@ cogl_pixel_format_get_type (void)
|
||||
|
||||
if (G_UNLIKELY (gtype == 0))
|
||||
{
|
||||
const GEnumValue values[] = {
|
||||
static const GEnumValue values[] = {
|
||||
{ COGL_PIXEL_FORMAT_ANY, "COGL_PIXEL_FORMAT_ANY", "any" },
|
||||
{ COGL_PIXEL_FORMAT_A_8, "COGL_PIXEL_FORMAT_A_8", "a-8" },
|
||||
{ COGL_PIXEL_FORMAT_RGB_565, "COGL_PIXEL_FORMAT_RGB_565", "rgb-565" },
|
||||
|
Loading…
Reference in New Issue
Block a user