Index: src/platform-win32.cc |
diff --git a/src/platform-win32.cc b/src/platform-win32.cc |
index d55cde91f879321cae8662585471a19398755664..bee517364a2fc879dbc3f661a33546140323219d 100644 |
--- a/src/platform-win32.cc |
+++ b/src/platform-win32.cc |
@@ -1251,10 +1251,10 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) { |
DWORD64 symbol_displacement; |
SmartPointer<IMAGEHLP_SYMBOL64> symbol( |
NewArray<IMAGEHLP_SYMBOL64>(kStackWalkMaxNameLen)); |
- if (!symbol) return kStackWalkError; // Out of memory. |
+ if (symbol.is_empty()) return kStackWalkError; // Out of memory. |
memset(*symbol, 0, sizeof(IMAGEHLP_SYMBOL64) + kStackWalkMaxNameLen); |
- symbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); |
- symbol->MaxNameLength = kStackWalkMaxNameLen; |
+ (*symbol)->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); |
+ (*symbol)->MaxNameLength = kStackWalkMaxNameLen; |
ok = _SymGetSymFromAddr64(process_handle, // hProcess |
stack_frame.AddrPC.Offset, // Address |
&symbol_displacement, // Displacement |
@@ -1276,13 +1276,13 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) { |
SNPrintF(MutableCStrVector(frames[frames_count].text, |
kStackWalkMaxTextLen), |
"%s %s:%d:%d", |
- symbol->Name, Line.FileName, Line.LineNumber, |
+ (*symbol)->Name, Line.FileName, Line.LineNumber, |
line_displacement); |
} else { |
SNPrintF(MutableCStrVector(frames[frames_count].text, |
kStackWalkMaxTextLen), |
"%s", |
- symbol->Name); |
+ (*symbol)->Name); |
} |
// Make sure line termination is in place. |
frames[frames_count].text[kStackWalkMaxTextLen - 1] = '\0'; |