Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 113ea98

Browse files
authored
Merge pull request #1554 from janhq/j/fix-crash
fix: crash while downloading model
2 parents 5ec0b4f + 8c14e43 commit 113ea98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/services/model_service.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "utils/engine_constants.h"
1212
#include "utils/file_manager_utils.h"
1313
#include "utils/huggingface_utils.h"
14-
#include "utils/json_helper.h"
1514
#include "utils/logging_utils.h"
1615
#include "utils/result.hpp"
1716
#include "utils/string_utils.h"
@@ -382,7 +381,8 @@ ModelService::DownloadModelFromCortexsoAsync(
382381
if (model_entry.has_value()) {
383382
return cpp::fail("Please delete the model before downloading again");
384383
}
385-
auto on_finished = [&, unique_model_id](const DownloadTask& finishedTask) {
384+
auto on_finished = [branch,
385+
unique_model_id](const DownloadTask& finishedTask) {
386386
const DownloadItem* model_yml_item = nullptr;
387387
auto need_parse_gguf = true;
388388

0 commit comments

Comments
 (0)