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:
parent
54e3a7c110
commit
e7274ba212
@ -922,9 +922,13 @@ bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)
|
||||
wxString wxHtmlParser::ExtractCharsetInformation(const wxString& markup)
|
||||
{
|
||||
wxString charset;
|
||||
wxMetaTagParser parser;
|
||||
parser.AddTagHandler(new wxMetaTagHandler(&charset));
|
||||
parser.Parse(markup);
|
||||
wxMetaTagParser *parser = new wxMetaTagParser();
|
||||
if(parser)
|
||||
{
|
||||
parser->AddTagHandler(new wxMetaTagHandler(&charset));
|
||||
parser->Parse(markup);
|
||||
delete parser;
|
||||
}
|
||||
return charset;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user