UI: Fix memory leak when drag/dropping

This commit is contained in:
Alex Anderson 2018-05-09 12:23:27 -07:00
parent ce89ae1057
commit 0accb9f865

View File

@ -107,8 +107,10 @@ void OBSBasic::AddDropSource(const char *data, DropType image)
break;
}
if (!obs_source_get_display_name(type))
if (!obs_source_get_display_name(type)) {
obs_data_release(settings);
return;
}
if (name.isEmpty())
name = obs_source_get_display_name(type);