X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0847e36eff0512bf3c50c01e8d9dcff5e693ada5..1632883f9ae83cb0f75b82432ab1f8ca7cfae451:/src/gtk/textentry.cpp diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 7b49e1150d..0bf2b128e9 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -350,7 +350,7 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) #if GTK_CHECK_VERSION(2,14,0) newBorder = gtk_border_new(); #else - newBorder = new GtkBorder; + newBorder = g_slice_new0(GtkBorder); #endif // Use some reasonable defaults for initial margins newBorder->left = 2; @@ -370,6 +370,12 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins) gtk_entry_set_inner_border(entry, newBorder); +#if GTK_CHECK_VERSION(2,14,0) + gtk_border_free(newBorder); +#else + g_slice_free(GtkBorder, newBorder); +#endif + return true; #else wxUnusedVar(margins);