SVN commit 759630 by aseigo: ensure that the file still exists before actually trying to render it; ultimately a KDirWatch should be placed on all the image paths used and deleted files should result in them being removed from the list. so this changes the crasher into just a bug ... CCBUG:155302 M +6 -4 backgrounddialog.cpp M +1 -1 backgroundpackage.cpp --- trunk/KDE/kdebase/workspace/plasma/containments/desktop/backgrounddialog.cpp #759629:759630 @@ -521,16 +521,16 @@ if (wallpaper.isEmpty()) { return; } - + // add background to the model m_model->addBackground(wallpaper); - + // select it int index = m_model->indexOf(wallpaper); if (index != -1) { m_view->setCurrentIndex(index); } - + // save it m_selected << wallpaper; } @@ -584,7 +584,9 @@ void BackgroundDialog::setPreview(const QString& img, Background::ResizeMethod method) { - m_preview_token = m_preview_renderer.render(img, m_color->color(), method, Qt::FastTransformation); + if (QFile::exists(img)) { + m_preview_token = m_preview_renderer.render(img, m_color->color(), method, Qt::FastTransformation); + } } void BackgroundDialog::slotAddDir() --- trunk/KDE/kdebase/workspace/plasma/containments/desktop/backgroundpackage.cpp #759629:759630 @@ -185,7 +185,7 @@ // choose the nearest resolution float best; QString bestImage; - foreach (QString entry, images) { + foreach (const QString &entry, images) { QSize candidate = resSize(QFileInfo(entry).baseName()); if (candidate == QSize()) { continue;