FIX: crash on MediaFilePanel when download in empty list

Change-Id: I13f33005a8730498aea28b32da2818ceca055aac
This commit is contained in:
chunmao.guo authored and Lane.Wei committed 2022-09-02 13:16:54 +08:00
1 parent 7184960dce
commit 0a7f696101
3 files changed
+13 -4

No files matched your search

+1 -1
View File
@@ -138,7 +138,7 @@ void Slic3r::GUI::ImageGrid::DoAction(size_t index, int action)
if (action == 0) {
m_file_sys->DeleteFiles(index);
} else {
if (index >= 0) {
if (index != -1) {
auto &file = m_file_sys->GetFile(index);
if (file.IsDownload() && file.progress >= -1) {
if (file.progress >= 100) {