Fix crash in DiagnosticInformation().

Refs #5870
This commit is contained in:
Gunnar Beutner 2014-03-29 23:02:55 +01:00
parent 64aa5d1b09
commit eb30f69454
1 changed files with 7 additions and 4 deletions

View File

@ -61,19 +61,22 @@ String DiagnosticInformation(const T& ex, StackTrace *stack = NULL, ContextTrace
if (boost::get_error_info<StackTraceErrorInfo>(ex) == NULL) {
result << std::endl;
if (!stack)
stack = GetLastExceptionStack();
if (stack)
result << *stack;
else
result << *GetLastExceptionStack();
}
if (boost::get_error_info<ContextTraceErrorInfo>(ex) == NULL) {
result << std::endl;
if (!context)
context = GetLastExceptionContext();
if (context)
result << *context;
else
result << *GetLastExceptionContext();
}
}