diff --git a/export_async.go b/export_async.go index 044b48b..1bb1270 100644 --- a/export_async.go +++ b/export_async.go @@ -143,8 +143,10 @@ func (e *ExportAsync) Run(ctx context.Context) (task_id string, cacheDir string, e.logTool.Errorf("导出panic:\n任务:%s,错误原因:%s", e.task.Id, _err) } e.release() - if e.uploader.Host != "" { - os.RemoveAll(tempDir) + if e.uploader != nil { + if e.uploader.Host != "" { + os.RemoveAll(tempDir) + } } cancel()