From f9876c519e514928151c0c5434edd3fc5c471d58 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Tue, 17 Feb 2015 06:19:22 +0000 Subject: [PATCH] Fix exception when creating a wxGauge. Platforms that don't make use of wxGaugeBase::Create when creating a wxGauge (such as GTK and MSW) access the uninitialised m_appProgressIndicator. Fix by initialising m_appProgressIndicator to NULL in the wxGaugeBase constructor. Regression since r78499. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gauge.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wx/gauge.h b/include/wx/gauge.h index a7057273d8..6bcc940781 100644 --- a/include/wx/gauge.h +++ b/include/wx/gauge.h @@ -51,7 +51,9 @@ class WXDLLIMPEXP_FWD_CORE wxAppProgressIndicator; class WXDLLIMPEXP_CORE wxGaugeBase : public wxControl { public: - wxGaugeBase() { m_rangeMax = m_gaugePos = 0; } + wxGaugeBase() : m_rangeMax(0), m_gaugePos(0), + m_appProgressIndicator(NULL) { } + virtual ~wxGaugeBase(); bool Create(wxWindow *parent,