Skip to content

Commit

Permalink
libobs: Fix pasting filters crash when missing sources
Browse files Browse the repository at this point in the history
Solves crash when a user tries to paste filters without selecting a
source or when pasting filters from a deleted source. This commit
checks if both sources are still valid before pasting.

This addresses Mantis Issue 1220
(https://obsproject.com/mantis/view.php?id=1220).
  • Loading branch information
Andersama committed Apr 18, 2018
1 parent 30d967e commit b0cd7fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libobs/obs-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ static void duplicate_filters(obs_source_t *dst, obs_source_t *src,

void obs_source_copy_filters(obs_source_t *dst, obs_source_t *src)
{
if (!obs_source_valid(dst, "obs_source_copy_filters"))
return;
if (!obs_source_valid(src, "obs_source_copy_filters"))
return;

duplicate_filters(dst, src, dst->context.private);
}

Expand Down

0 comments on commit b0cd7fe

Please sign in to comment.