Skip to content

Commit

Permalink
fix: dde-file-manager crash, search crash
Browse files Browse the repository at this point in the history
if window not exists, don't send sendStopSpinner event

Log: dde-file-manager crash, search crash
Bug: https://pms.uniontech.com/task-view-358757.html
  • Loading branch information
liyigang1 authored and max-lvs committed Aug 22, 2024
1 parent 272b910 commit 66e64a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ void CrumbInterface::onUpdateChildren(QList<QUrl> children)
QStringList list;

for (const auto &child : children) {
auto info = InfoFactory::create<FileInfo>(child);
if (info)
list.append(info->nameOf(NameInfoType::kFileName));
list.append(child.fileName());
}
emit completionFound(list);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "utils/searchhelper.h"

#include <dfm-base/dfm_event_defines.h>
#include <dfm-base/widgets/filemanagerwindowsmanager.h>

#include <dfm-framework/dpf.h>

Expand Down Expand Up @@ -34,7 +35,8 @@ void SearchEventCaller::sendStartSpinner(quint64 winId)

void SearchEventCaller::sendStopSpinner(quint64 winId)
{
dpfSlotChannel->push("dfmplugin_titlebar", "slot_Spinner_Stop", winId);
if (dfmbase::FileManagerWindowsManager::instance().findWindowById(winId))
dpfSlotChannel->push("dfmplugin_titlebar", "slot_Spinner_Stop", winId);
}

}

0 comments on commit 66e64a7

Please sign in to comment.