Fix to bug #1046289. dtor of wxMetaTagParser must be executed earlier than dtor of 'charset'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -922,9 +922,13 @@ bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
|
|||||||
wxString wxHtmlParser::ExtractCharsetInformation(const wxString& markup)
|
wxString wxHtmlParser::ExtractCharsetInformation(const wxString& markup)
|
||||||
{
|
{
|
||||||
wxString charset;
|
wxString charset;
|
||||||
wxMetaTagParser parser;
|
wxMetaTagParser *parser = new wxMetaTagParser();
|
||||||
parser.AddTagHandler(new wxMetaTagHandler(&charset));
|
if(parser)
|
||||||
parser.Parse(markup);
|
{
|
||||||
|
parser->AddTagHandler(new wxMetaTagHandler(&charset));
|
||||||
|
parser->Parse(markup);
|
||||||
|
delete parser;
|
||||||
|
}
|
||||||
return charset;
|
return charset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user