]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.cpp
handled the case when the map is not available
[toast/confclerk.git] / src / gui / mainwindow.cpp
index 8682e5a6758f95ed8228663f3ed58e9a8dfa2b66..049c52daca51adaf2091cf0e9f4f0ddf4c2f1efc 100644 (file)
@@ -200,6 +200,8 @@ void MainWindow::displayMap(const QModelIndex &aIndex)
 {
     Event *event = static_cast<Event*>(aIndex.internalPointer());
     QString mapPath = QString(":/maps/rooms/%1.png").arg(event->room());
+    if(!QFile::exists(mapPath))
+        mapPath = QString(":/maps/rooms/not-available.png");
     QPixmap map(mapPath);
     MapWindow window(map,this);
     window.exec();