浏览代码

UI: Don't try to create service if missing file

This would cause meaningless "Service '' not found" log entries.
Richard Stanway 5 年之前
父节点
当前提交
aa313a1fb1
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      UI/window-basic-main.cpp

+ 3 - 0
UI/window-basic-main.cpp

@@ -1118,6 +1118,9 @@ bool OBSBasic::LoadService()
 	obs_data_t *data =
 		obs_data_create_from_json_file_safe(serviceJsonPath, "bak");
 
+	if (!data)
+		return false;
+
 	obs_data_set_default_string(data, "type", "rtmp_common");
 	type = obs_data_get_string(data, "type");