From db7aebb94054461e236089c093ff4089d2ff7750 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 22 Oct 2015 17:45:58 -0700 Subject: [PATCH] libobs: Allow null pointer with obs_source_release_frame A null pointer to a release/destroy function should be considered legal, and simply do nothing. --- libobs/obs-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index d63e95125..ed7f73373 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -2285,7 +2285,7 @@ struct obs_source_frame *obs_source_get_frame(obs_source_t *source) void obs_source_release_frame(obs_source_t *source, struct obs_source_frame *frame) { - if (!obs_ptr_valid(frame, "obs_source_release_frame")) + if (!frame) return; if (!source) {