X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d6c6a32321219a3a2961e7f1ee1a8d2d54dc5cdf..71aba8333cc915afff9e740c944f7fa7247abacb:/docs/latex/wx/function.tex

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 18b28a1470..0318e25402 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -1954,7 +1954,7 @@ For example:
   int answer = wxMessageBox("Quit program?", "Confirm",
                             wxYES_NO | wxCANCEL, main_frame);
   if (answer == wxYES)
-    delete main_frame;
+    main_frame->Close();
   ...
 \end{verbatim}
 
