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:
parent
d002345a11
commit
f7332b467a
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user