Reintroduce null check.

This commit is contained in:
Lukas Brübach 2025-01-22 10:25:34 +01:00
parent 1237d9b480
commit d8ea31e2cc

View file

@ -67,6 +67,10 @@ QList<DeckPreviewWidget *> &VisualDeckStorageSortWidget::filterFiles(QList<DeckP
{
// Sort the widgets list based on the current sort order
std::sort(widgets.begin(), widgets.end(), [this](DeckPreviewWidget *widget1, DeckPreviewWidget *widget2) {
if (!widget1 || !widget2) {
return false; // Handle null pointers gracefully
}
QFileInfo info1(widget1->filePath);
QFileInfo info2(widget2->filePath);