Avoid a crash

svn path=/trunk/; revision=20863
This commit is contained in:
Matthias Clasen 2008-07-18 19:03:54 +00:00
parent 0278fdcbc2
commit 71e134617c
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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);