Avoid binding reference to NULL pointer when wxUSE_VALIDATORS==0

Undefined behavior sanitizer complains about it
This commit is contained in:
Paul Cornett
2019-04-04 10:56:14 -07:00
parent 90ce6a4334
commit 25e9be6873
2 changed files with 8 additions and 8 deletions

View File

@@ -23,8 +23,6 @@
#include "wx/window.h"
#endif
const wxValidator wxDefaultValidator;
wxIMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler);
// VZ: personally, I think true would be more appropriate - these bells are
@@ -39,6 +37,10 @@ wxValidator::wxValidator()
wxValidator::~wxValidator()
{
}
#else
#endif
// wxUSE_VALIDATORS
class WXDLLIMPEXP_CORE wxValidator { };
#endif // wxUSE_VALIDATORS
const wxValidator wxDefaultValidator;