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:
parent
2e6b7e938f
commit
123b618f48
@ -43,7 +43,7 @@ ConditionVariableWrapper* ConditionVariableNativeWin::Create() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ConditionVariableNativeWin::Init() {
|
bool ConditionVariableNativeWin::Init() {
|
||||||
bool win_support_condition_variables_primitive = true;
|
bool win_support_condition_variables_primitive = false;
|
||||||
if (!library) {
|
if (!library) {
|
||||||
// Native implementation is supported on Vista+.
|
// Native implementation is supported on Vista+.
|
||||||
library = LoadLibrary(TEXT("Kernel32.dll"));
|
library = LoadLibrary(TEXT("Kernel32.dll"));
|
||||||
@ -69,8 +69,7 @@ bool ConditionVariableNativeWin::Init() {
|
|||||||
WEBRTC_TRACE(
|
WEBRTC_TRACE(
|
||||||
kTraceStateInfo, kTraceUtility, -1,
|
kTraceStateInfo, kTraceUtility, -1,
|
||||||
"Loaded native condition variables");
|
"Loaded native condition variables");
|
||||||
} else {
|
win_support_condition_variables_primitive = true;
|
||||||
win_support_condition_variables_primitive = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user