X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/908eeca88dee75d5ac3ba10d539fb7e0f5387d2c..19c7ac3d3bf1ac2113505a805a79c40ce3db1f5b:/src/gtk/slider.cpp diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index f14ae6394a..e620468043 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -304,9 +304,10 @@ bool wxSlider::Create(wxWindow *parent, } if (style & wxSL_VERTICAL) - m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscale_new( NULL ); else - m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscale_new( NULL ); + g_object_ref(m_widget); gtk_scale_set_draw_value(GTK_SCALE (m_widget), (style & wxSL_LABELS) != 0); // Keep full precision in position value