mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
libobs: Check source textures before destroying
Check to make sure the texrenders and textures on a source are valid before destroying.
This commit is contained in:
+6
-3
@@ -370,9 +370,12 @@ void obs_source_destroy(struct obs_source *source)
|
||||
obs_source_frame_decref(source->async_cache.array[i].frame);
|
||||
|
||||
gs_enter_context(obs->video.graphics);
|
||||
gs_texrender_destroy(source->async_convert_texrender);
|
||||
gs_texture_destroy(source->async_texture);
|
||||
gs_texrender_destroy(source->filter_texrender);
|
||||
if (source->async_convert_texrender)
|
||||
gs_texrender_destroy(source->async_convert_texrender);
|
||||
if (source->async_texture)
|
||||
gs_texture_destroy(source->async_texture);
|
||||
if (source->filter_texrender)
|
||||
gs_texrender_destroy(source->filter_texrender);
|
||||
gs_leave_context();
|
||||
|
||||
for (i = 0; i < MAX_AV_PLANES; i++)
|
||||
|
||||
Reference in New Issue
Block a user