diff --git a/src/play_controller.cpp b/src/play_controller.cpp index 303597ee88e4..4a138868bec3 100644 --- a/src/play_controller.cpp +++ b/src/play_controller.cpp @@ -84,7 +84,7 @@ static void clear_resources() resources::tunnels = NULL; resources::undo_stack = NULL; resources::units = NULL; - resources::whiteboard = NULL; + resources::whiteboard.reset(); resources::classification = NULL; @@ -259,7 +259,7 @@ void play_controller::init(CVideo& video){ pathfind_manager_.reset(new pathfind::manager(level_)); whiteboard_manager_.reset(new wb::manager()); resources::tunnels = pathfind_manager_.get(); - resources::whiteboard = whiteboard_manager_.get(); + resources::whiteboard = whiteboard_manager_; LOG_NG << "building terrain rules... " << (SDL_GetTicks() - ticks_) << std::endl; loadscreen::start_stage("build terrain"); diff --git a/src/resources.cpp b/src/resources.cpp index eb1feea81c38..25c1cb8d3e96 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -31,7 +31,7 @@ namespace resources pathfind::manager *tunnels = NULL; actions::undo_list *undo_stack = NULL; unit_map *units = NULL; - wb::manager *whiteboard = NULL; + boost::shared_ptr whiteboard = boost::shared_ptr(); game_classification *classification = NULL; const mp_game_settings *mp_settings = NULL; } diff --git a/src/resources.hpp b/src/resources.hpp index 848e54a0a1d3..efdae3d68322 100644 --- a/src/resources.hpp +++ b/src/resources.hpp @@ -16,6 +16,7 @@ #define RESOURCES_H_ #include +#include class game_board; class game_config_manager; @@ -57,7 +58,7 @@ namespace resources extern pathfind::manager *tunnels; extern actions::undo_list *undo_stack; extern unit_map *units; - extern wb::manager *whiteboard; + extern boost::shared_ptr whiteboard; } #endif