diff options
| author | Graham Madarasz <graham@lindenlab.com> | 2013-06-05 07:38:54 -0700 | 
|---|---|---|
| committer | Graham Madarasz <graham@lindenlab.com> | 2013-06-05 07:38:54 -0700 | 
| commit | bc6070bd197159dd81750d1e2e8af493864be818 (patch) | |
| tree | a06687caca1de68935066daa11a8031cd3fd6ccb /indra/llcommon | |
| parent | 1fcf54094a915bbc7ec1d74a877699212714ae93 (diff) | |
MAINT-2740 more comment grooming and NULL string guard
Diffstat (limited to 'indra/llcommon')
| -rwxr-xr-x | indra/llcommon/llerror.cpp | 13 | ||||
| -rwxr-xr-x | indra/llcommon/llerror.h | 2 | 
2 files changed, 10 insertions, 5 deletions
| diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 37ba097832..d2af004cde 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -1402,15 +1402,20 @@ namespace LLError  #if LL_WINDOWS  	void LLOutputDebugUTF8(const std::string& s)  	{ -		// Be careful not to enable this in non-debug builds as there are bad interactions between the -		// exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 +		// Be careful when calling OutputDebugString as it throws DBG_PRINTEXCEPTION_C  +		// which works just fine under the windows debugger, but can cause users who +		// have enabled SEHOP exception chain validation to crash due to interactions +		// between the Win 32-bit exception handling and boost coroutine fiber stacks. BUG-2707  		//  		if (IsDebuggerPresent())  		{  			// Need UTF16 for Unicode OutputDebugString  			// -			OutputDebugString(utf8str_to_utf16str(s).c_str()); -			OutputDebugString(TEXT("\n")); +			if (s.size()) +			{ +				OutputDebugString(utf8str_to_utf16str(s).c_str()); +				OutputDebugString(TEXT("\n")); +			}  		}  	}  #endif diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index cc9bfba818..0b723aeb5d 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -206,7 +206,7 @@ namespace LLError  }  #if LL_WINDOWS -	// Macro accepting a const std::string& for display in windows debugging console in debug builds only +	// Macro accepting a std::string for display in windows debugging console  	#define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8(a)  #else  	#define LL_WINDOWS_OUTPUT_DEBUG(a) | 
