X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..b0b71b31c3b07b973d230c179d74b41eb5aaa115:/src/gtk/scrolbar.cpp?ds=sidebyside diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 413e8fbe3c..dc832e0b6c 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -141,9 +141,10 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const bool isVertical = (style & wxSB_VERTICAL) != 0; if (isVertical) - m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_vscrollbar_new( NULL ); else - m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); + m_widget = gtk_hscrollbar_new( NULL ); + g_object_ref(m_widget); m_scrollBar[0] = (GtkRange*)m_widget;