Fix a crash issue on WinXP where LoadLibrary(TEXT("Kernel32.dll")) may fail.

BUG=crbug.com/226301
TBR=henrike
Review URL: https://webrtc-codereview.appspot.com/1293004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3772 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
wu@webrtc.org 2013-04-06 04:13:51 +00:00
parent 2e6b7e938f
commit 123b618f48

View File

@ -43,7 +43,7 @@ ConditionVariableWrapper* ConditionVariableNativeWin::Create() {
}
bool ConditionVariableNativeWin::Init() {
bool win_support_condition_variables_primitive = true;
bool win_support_condition_variables_primitive = false;
if (!library) {
// Native implementation is supported on Vista+.
library = LoadLibrary(TEXT("Kernel32.dll"));
@ -69,8 +69,7 @@ bool ConditionVariableNativeWin::Init() {
WEBRTC_TRACE(
kTraceStateInfo, kTraceUtility, -1,
"Loaded native condition variables");
} else {
win_support_condition_variables_primitive = false;
win_support_condition_variables_primitive = true;
}
}
}