Decklink: Fix crash when no matching device

OBS crashes when decklink output is auto started and the device is
removed or changed to different model while OBS is not running.

Fixes https://github.com/obsproject/obs-studio/issues/2494
This commit is contained in:
Afriza N. Arief 2020-04-03 00:32:33 +07:00 committed by GitHub
parent d002345a11
commit f7332b467a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,9 @@ static bool decklink_output_start(void *data)
device.Set(deviceEnum->FindByHash(decklink->deviceHash));
if (!device)
return false;
DeckLinkDeviceMode *mode = device->FindOutputMode(decklink->modeID);
decklink->SetSize(mode->GetWidth(), mode->GetHeight());