]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textentry.cpp
Fix waiting for IO on UDP sockets.
[wxWidgets.git] / src / gtk / textentry.cpp
index 7b49e1150d3a8a3447a1ca130b65b76d59d4ce90..0bf2b128e9743c61c042dd35c7225180f5b8ceff 100644 (file)
@@ -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);