QTfrontend/ui/widget/mapContainer.cpp
changeset 7008 25563f054ef3
parent 6983 ede55af89e78
child 7014 c0b32404ef74
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu May 03 01:18:29 2012 +0200
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu May 03 02:45:08 2012 +0200
@@ -297,6 +297,7 @@
     pMap = new HWMap();
     connect(pMap, SIGNAL(ImageReceived(const QImage)), this, SLOT(setImage(const QImage)));
     connect(pMap, SIGNAL(HHLimitReceived(int)), this, SLOT(setHHLimit(int)));
+    connect(pMap, SIGNAL(destroyed(QObject *)), this, SLOT(onPreviewMapDestroyed(QObject *)));
     pMap->getImage(m_seed,
                    getTemplateFilter(),
                    get_mapgen(),
@@ -602,3 +603,10 @@
     }
 
 }
+
+
+void HWMapContainer::onPreviewMapDestroyed(QObject * map)
+{
+    if (map == pMap)
+        pMap = 0;
+}