From 660c5652010c3b48dd62c895bcaa05cf0c8a7fe9 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 8 Aug 2014 20:37:24 +0000 Subject: [PATCH] fix running on GTK < 2.10 when built with later, broken in r72935 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/control.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index cf25778626..30409cd133 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -332,7 +332,10 @@ wxPoint wxControl::GTKGetEntryMargins(GtkEntry* entry) const #ifndef __WXGTK3__ #if GTK_CHECK_VERSION(2,10,0) // The margins we have previously set - const GtkBorder* border = gtk_entry_get_inner_border(entry); + const GtkBorder* border = NULL; + if (gtk_check_version(2,10,0) == NULL) + border = gtk_entry_get_inner_border(entry); + if ( border ) { marg.x = border->left + border->right;