Skip to content

Commit

Permalink
World: Disconnect the MapConversionReporter once map editing ends
Browse files Browse the repository at this point in the history
Once editing has ended when converting a map in some other format
we are no longer interested in being notified of any issues.
  • Loading branch information
danij-deng committed Jun 19, 2013
1 parent c4f3461 commit 4074ecb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doomsday/client/src/world/world.cpp
Expand Up @@ -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.
Expand All @@ -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...
Expand Down

0 comments on commit 4074ecb

Please sign in to comment.