]> git.saurik.com Git - wxWidgets.git/commitdiff
gtk_border_free is for freeing GtkBorder's, not g_free.
authorMart Raudsepp <leio@gentoo.org>
Mon, 18 Jun 2007 06:03:50 +0000 (06:03 +0000)
committerMart Raudsepp <leio@gentoo.org>
Mon, 18 Jun 2007 06:03:50 +0000 (06:03 +0000)
Using g_free instead used to have no ill effects as gtk_border_free called that anyway, but in gtk+-2.11 GtkBorder
uses GSlice and gtk_border_free therefore uses g_slice_free and using g_free makes things crash hard.
So fix it or wxGTK won't work with the upcoming gtk+-2.12 stable release planned for end of July.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/button.cpp
src/gtk/window.cpp

index e9b395f835f0de6e18ee10cbc95161f41554bc0b..71cfd13497ebfef4fb844f29eb60f05218b2e236 100644 (file)
@@ -71,7 +71,7 @@ gtk_button_style_set_callback( GtkWidget *m_widget, GtkStyle *WXUNUSED(style), w
             right_border += default_border->right;
             top_border += default_border->top;
             bottom_border += default_border->bottom;
-            g_free( default_border );
+            gtk_border_free( default_border );
         }
         win->MoveWindow(
             win->m_x - top_border,
index 7b245651356fbe70816c65b41251937ab9c5c583..5ccb0226705b6b531e0d3edbf852f65f0e87e9f8 100644 (file)
@@ -2738,7 +2738,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
                 right_border += default_border->right;
                 top_border += default_border->top;
                 bottom_border += default_border->bottom;
-                g_free( default_border );
+                gtk_border_free( default_border );
             }
         }