Commit a316c10
committed
bugfix(system): Add defensive check in extractCrashLocation for empty strings
Add null and empty string checks after calling g_LastErrorDump.str() to
handle cases where isEmpty() doesn't work reliably across different build
configurations and STL implementations.
Issue discovered in testing: Location field showed different values across builds
when calling ReleaseCrash() without exception context:
- Win32 Release: Empty (correct)
- VC6 Release: Shows 'T' (incorrect - isEmpty() failed)
- Win32 Debug: Shows corrupted data (incorrect - isEmpty() failed)
The additional check ensures consistent behavior across all builds.
This doesn't affect real crashes - exceptions always populate g_LastErrorDump
through DumpExceptionInfo() which properly clears and fills the string.
Relates to TheSuperHackers#20691 parent 81bc3fd commit a316c10
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
760 | 767 | | |
761 | 768 | | |
762 | 769 | | |
| |||
0 commit comments