Skip to content

Commit cb3a144

Browse files
committed
Fixed memory leak in processing XML with paste button
1 parent e6f42e5 commit cb3a144

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dialogs/world_prefs/genpropertypage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,11 @@ CString strContents;
954954
{
955955
iCount = m_doc->Load_World_XML (ar, m_iMask | XML_NO_PLUGINS);
956956
}
957-
catch (CArchiveException* )
957+
catch (CArchiveException* e)
958958
{
959959
::TMessageBox ("There was a problem parsing the XML on the clipboard. "
960960
"See the error window for more details");
961+
e->Delete ();
961962
}
962963

963964
if (iCount == 0)

0 commit comments

Comments
 (0)