| Index: webrtc/base/platform_thread.cc
|
| diff --git a/webrtc/base/platform_thread.cc b/webrtc/base/platform_thread.cc
|
| index 286bee95f1299823920ec03175962dbf61e9cba8..0b025f2af048f94d9e776f171276850f54ef952e 100644
|
| --- a/webrtc/base/platform_thread.cc
|
| +++ b/webrtc/base/platform_thread.cc
|
| @@ -119,6 +119,11 @@ PlatformThread::~PlatformThread() {
|
|
|
| #if defined(WEBRTC_WIN)
|
| DWORD WINAPI PlatformThread::StartThread(void* param) {
|
| + // The GetLastError() function only returns valid results when it is called
|
| + // after a Win32 API function that returns a "failed" result. A crash dump
|
| + // contains the result from GetLastError() and to make sure it does not
|
| + // falsely report a Windows error we call SetLastError here.
|
| + ::SetLastError(ERROR_SUCCESS);
|
| static_cast<PlatformThread*>(param)->Run();
|
| return 0;
|
| }
|
|
|