avoid an assert in wxString::GetWriteBuf()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -350,6 +350,8 @@ void wxRegConfig::SetPath(const wxString& strPath)
|
|||||||
|
|
||||||
// registry APIs want backslashes instead of slashes
|
// registry APIs want backslashes instead of slashes
|
||||||
wxString strRegPath;
|
wxString strRegPath;
|
||||||
|
if ( !m_strPath.empty() )
|
||||||
|
{
|
||||||
size_t len = m_strPath.length();
|
size_t len = m_strPath.length();
|
||||||
|
|
||||||
const wxChar *src = m_strPath.c_str();
|
const wxChar *src = m_strPath.c_str();
|
||||||
@@ -365,6 +367,7 @@ void wxRegConfig::SetPath(const wxString& strPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strRegPath.UngetWriteBuf(len);
|
strRegPath.UngetWriteBuf(len);
|
||||||
|
}
|
||||||
|
|
||||||
// this is not needed any longer as we don't create keys unnecessarily any
|
// this is not needed any longer as we don't create keys unnecessarily any
|
||||||
// more (now it is done on demand, i.e. only when they're going to contain
|
// more (now it is done on demand, i.e. only when they're going to contain
|
||||||
|
Reference in New Issue
Block a user