Skip to content

Commit

Permalink
Decklink: Fix crash when no matching device
Browse files Browse the repository at this point in the history
OBS crashes when decklink output is auto started and the device is
removed or changed to different model while OBS is not running.

Fixes obsproject#2494
  • Loading branch information
afriza authored and Oncorporation committed May 14, 2020
1 parent d31819c commit 979c9a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/decklink/decklink-output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 979c9a2

Please sign in to comment.