forked from AuroraMiddleware/gtk
Catch directfb errors in gdk_colormap_new
Patch by Andre Draszik, bug 609172.
This commit is contained in:
parent
938795f922
commit
f6a173d302
@ -119,9 +119,16 @@ gdk_colormap_new (GdkVisual *visual,
|
||||
{
|
||||
case GDK_VISUAL_PSEUDO_COLOR:
|
||||
{
|
||||
IDirectFB *dfb = _gdk_display->directfb;
|
||||
IDirectFBPalette *palette;
|
||||
GdkColormapPrivateDirectFB *private;
|
||||
DFBPaletteDescription dsc;
|
||||
|
||||
dsc.flags = DPDESC_SIZE;
|
||||
dsc.size = colormap->size;
|
||||
if (!dfb->CreatePalette (dfb, &dsc, &palette))
|
||||
return NULL;
|
||||
|
||||
colormap->colors = g_new0 (GdkColor, colormap->size);
|
||||
|
||||
private = g_new0 (GdkColormapPrivateDirectFB, 1);
|
||||
@ -133,10 +140,7 @@ gdk_colormap_new (GdkVisual *visual,
|
||||
private->info[0].ref_count++;
|
||||
}
|
||||
|
||||
dsc.flags = DPDESC_SIZE;
|
||||
dsc.size = colormap->size;
|
||||
_gdk_display->directfb->CreatePalette (
|
||||
_gdk_display->directfb, &dsc, &private->palette);
|
||||
private->palette = palette;
|
||||
|
||||
colormap->windowing_data = private;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user