Skip to content

Commit

Permalink
Fixed use-after-free
Browse files Browse the repository at this point in the history
  • Loading branch information
olanti-p committed Feb 4, 2020
1 parent fd79feb commit 31c4a85
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ game::game() :
// The reason for this move is so that g is not uninitialized when it gets to installing the parts into vehicles.
}

game::~game() = default;

// Load everything that will not depend on any mods
void game::load_static_data()
{
Expand Down Expand Up @@ -403,11 +405,6 @@ void game::load_data_from_dir( const std::string &path, const std::string &src,
DynamicDataLoader::get_instance().load_data_from_path( path, src, ui );
}

game::~game()
{
MAPBUFFER.reset();
}

// Fixed window sizes
#define MINIMAP_HEIGHT 7
#define MINIMAP_WIDTH 7
Expand Down

0 comments on commit 31c4a85

Please sign in to comment.