X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/00dc9772321d7539fd155cdf529821f2fbfc82fb..ac0c512d865e6236fc81882cb84cc38d09f8f0ec:/src/gtk/spinctrl.cpp

diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp
index e51e428d56..5f8406cbe0 100644
--- a/src/gtk/spinctrl.cpp
+++ b/src/gtk/spinctrl.cpp
@@ -151,7 +151,8 @@ int wxSpinCtrl::GetValue() const
 
     GtkDisableEvents();
     gtk_spin_button_update( GTK_SPIN_BUTTON(m_widget) );
-    m_pos = int(gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget)));
+    wx_const_cast(wxSpinCtrl*, this)->m_pos =
+        int(gtk_spin_button_get_value(GTK_SPIN_BUTTON(m_widget)));
     GtkEnableEvents();
 
     return m_pos;