From af184f1d2f87251da968014652c86736a92b739d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Apr 2012 23:22:05 +0000 Subject: [PATCH] Work around wxDateTime::ParseFormat() problem in generic wxDateTimePickerCtrl. Due to a bug in wxDateTime::ParseFormat(), calling it with wxString::c_str() currently just crashes, so don't do this in generic wxDateTimePickerCtrl code. The real fix is, of course, to correct the bug in wxDateTime itself but for now this at least prevents the crash when executing the test suite. And using c_str() here is unnecessary anyhow. See #14214. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datectlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index 7ee0b66c88..869ef3aad8 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -130,7 +130,7 @@ public: if ( !s.empty() ) { - pDt->ParseFormat(s.c_str(), m_format); + pDt->ParseFormat(s, m_format); if ( !pDt->IsValid() ) return false; } -- 2.45.2