diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gdk/directfb/gdkvisual-directfb.c | 5 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,10 @@ +2007-08-18 Matthias Clasen <mclasen@redhat.com> + + Bug 543217 – GTK application crashed with directfb backend + + * gdk/directfb/gdkvisual-directfb.c: Avoid a crash in + _gdk_visual_init(). Patch by Huimin He. + 2008-07-18 Federico Mena Quintero <federico@novell.com> * demos/gtk-demo/changedisplay.c (find_toplevel_at_pointer): Don't diff --git a/gdk/directfb/gdkvisual-directfb.c b/gdk/directfb/gdkvisual-directfb.c index ae5800d01..43ecb83b4 100644 --- a/gdk/directfb/gdkvisual-directfb.c +++ b/gdk/directfb/gdkvisual-directfb.c @@ -137,7 +137,7 @@ _gdk_visual_init () to ensure the base format ARGB LUT8 RGB etc then add ones supported by the hardware */ - for (i = 0, c = 0; i < G_N_ELEMENTS (formats); i++) + for (i = 0; i < G_N_ELEMENTS (formats); i++) { IDirectFBSurface *src; DFBAccelerationMask acc; @@ -157,8 +157,7 @@ _gdk_visual_init () if (acc & DFXL_BLIT || formats[i] == dlc.pixelformat) { - system_visual = GDK_VISUAL (visuals[c]); - c++; + system_visual = GDK_VISUAL (visuals[i]); } src->Release (src); |