未验证 提交 44bdf60d 编写于 作者: J Jim 提交者: GitHub

Merge pull request #3394 from cg2121/fix-leak

UI: Fix memory leak when dropping files
...@@ -51,8 +51,11 @@ static string GenerateSourceName(const char *base) ...@@ -51,8 +51,11 @@ static string GenerateSourceName(const char *base)
} }
obs_source_t *source = obs_get_source_by_name(name.c_str()); obs_source_t *source = obs_get_source_by_name(name.c_str());
if (!source) if (!source)
return name; return name;
else
obs_source_release(source);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册