X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78a11854a048c5ab753b0de3f474fac392d649a3..ceef3893cb12d80e679d4b619fb086529a36c2a8:/src/common/debugrpt.cpp

diff --git a/src/common/debugrpt.cpp b/src/common/debugrpt.cpp
index 2fa3683d07..e9044154a7 100644
--- a/src/common/debugrpt.cpp
+++ b/src/common/debugrpt.cpp
@@ -478,11 +478,13 @@ bool wxDebugReport::AddContext(wxDebugReport::Context ctx)
 #if wxUSE_STACKWALKER
     wxXmlNode *nodeStack = new wxXmlNode(wxXML_ELEMENT_NODE, _T("stack"));
     XmlStackWalker sw(nodeStack);
+#if wxUSE_ON_FATAL_EXCEPTION
     if ( ctx == Context_Exception )
     {
         sw.WalkFromException();
     }
     else // Context_Current
+#endif // wxUSE_ON_FATAL_EXCEPTION
     {
         sw.Walk();
     }