mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876878: Avoid null deref if camera doesn't update framelist ptr r=bas
This commit is contained in:
parent
b9c3f59eda
commit
1a83b7de43
@ -586,7 +586,7 @@ int32_t DeviceInfoDS::CreateCapabilityMap(
|
||||
|
||||
if (hrVC == S_OK)
|
||||
{
|
||||
LONGLONG *frameDurationList;
|
||||
LONGLONG *frameDurationList = NULL;
|
||||
LONGLONG maxFPS;
|
||||
long listSize;
|
||||
SIZE size;
|
||||
@ -605,7 +605,9 @@ int32_t DeviceInfoDS::CreateCapabilityMap(
|
||||
|
||||
// On some odd cameras, you may get a 0 for duration.
|
||||
// GetMaxOfFrameArray returns the lowest duration (highest FPS)
|
||||
if (hrVC == S_OK && listSize > 0 &&
|
||||
// Initialize and check the returned list for null since
|
||||
// some broken drivers don't modify it.
|
||||
if (hrVC == S_OK && listSize > 0 && frameDurationList &&
|
||||
0 != (maxFPS = GetMaxOfFrameArray(frameDurationList,
|
||||
listSize)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user