FIX:fixed crash caused by unable to resolve file name

Change-Id: I98388cd95e8b2bc26d33cddcc4945580a1c34292
This commit is contained in:
tao wang 2022-10-31 19:54:23 +08:00 committed by Lane.Wei
parent 451352183c
commit 1c4ed26b81
5 changed files with 31 additions and 22 deletions

View file

@ -129,8 +129,12 @@ namespace GUI {
if (j["data"].contains("download_url"))
download_url = j["data"]["download_url"].get<std::string>();
std::string filename = "";
if (j["data"].contains("filename"))
download_url = j["data"]["filename"].get<std::string>();
if (download_url.empty()) return;
wxGetApp().plater()->request_model_download(download_url);
wxGetApp().plater()->request_model_download(download_url, filename);
}
}