diff --git a/service/DouyinCommonService.cs b/service/DouyinCommonService.cs index 9d1b14a..03ff704 100644 --- a/service/DouyinCommonService.cs +++ b/service/DouyinCommonService.cs @@ -19,10 +19,10 @@ namespace dy.net.service public AppConfig GetConfig() { - var config= sqlSugarClient.Queryable().First(); + var config = sqlSugarClient.Queryable().First(); var downImgConfig = Appsettings.Get(SystemStaticUtil.DOWN_IMAGE_VIDEO_ENABLE); - if (!string.IsNullOrEmpty(downImgConfig)) + if (config != null && !string.IsNullOrEmpty(downImgConfig)) { downImgConfig = downImgConfig.ToLower(); config.DownImageVideoFromEnv = downImgConfig == "1";