From 4074ecb50ed3d162da92ba1e97a29ba7f57c7163 Mon Sep 17 00:00:00 2001 From: danij Date: Wed, 19 Jun 2013 05:37:40 +0100 Subject: [PATCH] World: Disconnect the MapConversionReporter once map editing ends Once editing has ended when converting a map in some other format we are no longer interested in being notified of any issues. --- doomsday/client/src/world/world.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doomsday/client/src/world/world.cpp b/doomsday/client/src/world/world.cpp index 4fda1cee92..4b4d4aa6f3 100644 --- a/doomsday/client/src/world/world.cpp +++ b/doomsday/client/src/world/world.cpp @@ -694,7 +694,7 @@ bool World::changeMap(de::Uri const &uri) Map *newMap = d->loadMap(uri); // The map may still be in an editable state -- switch to playable. - if(newMap->isEditable()) + if(newMap && newMap->isEditable()) { // Configure a reporter to observe the process. /// @todo Make the reporter available during the format conversion. @@ -708,6 +708,10 @@ bool World::changeMap(de::Uri const &uri) // Output a human-readable log of any issues encountered in the process. reporter.writeLog(); + // We are no longer interested in reports about this map. + newMap->audienceForOneWayWindowFound -= reporter; + newMap->audienceForUnclosedSectorFound -= reporter; + if(!mapIsPlayable) { // Darn, clean up...