提交 485a0062 编写于 作者: J jp9000

libobs: Check source textures before destroying

Check to make sure the texrenders and textures on a source are valid
before destroying.
上级 d242004b
......@@ -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++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册