From f5c3d9d1fbf3a3413cac035d96296540f9788f01 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Thu, 23 Jan 2020 23:23:18 +0000 Subject: [PATCH] OSX: Ignore wxHSCROLL and wxVSCROLL in wxDataViewCtrl Using these two style flags in wxDataViewCtrl causes the library to seg fault when trying to create the scrollbars. The wxDataViewCtrl has scrollbars already without these flags. Closes #17028 --- src/osx/dataview_osx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osx/dataview_osx.cpp b/src/osx/dataview_osx.cpp index 60e57b70f2..0bee2da4fa 100644 --- a/src/osx/dataview_osx.cpp +++ b/src/osx/dataview_osx.cpp @@ -365,6 +365,10 @@ bool wxDataViewCtrl::Create(wxWindow *parent, const wxValidator& validator, const wxString& name) { + // Remove wxVSCROLL and wxHSCROLL from the style, since the dataview panel has scrollbars + // by default, and wxControl::Create trys to make some but crashes in the process + style &= ~(wxVSCROLL | wxHSCROLL); + DontCreatePeer(); if (!(wxControl::Create(parent,id,pos,size,style,validator,name))) return false;