0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

libobs: Fix pasting filters crash when missing sources

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).
This commit is contained in:
Alex Anderson 2018-04-18 09:11:47 -07:00
parent 30d967eafa
commit b0cd7fe890

View File

@ -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);
}