From 34a03f851113f2f481c4a5f07d30ffaee091f6ba Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 13 Jul 2015 09:44:15 +0100 Subject: [PATCH] Reset existing data when loading new plugin. --- src/backend/plugin/plugin_loader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backend/plugin/plugin_loader.cpp b/src/backend/plugin/plugin_loader.cpp index da52c7fa..80b10737 100644 --- a/src/backend/plugin/plugin_loader.cpp +++ b/src/backend/plugin/plugin_loader.cpp @@ -45,6 +45,14 @@ namespace loot { espm::File * file = nullptr; espm::Settings espmSettings; + // Clear existing data. + _isEmpty = true; + _isMaster = false; + _formIDs.clear(); + _masters.clear(); + _description.clear(); + _crc = 0; + // Get data from file contents using libespm. BOOST_LOG_TRIVIAL(trace) << name << ": " << "Opening with libespm..."; boost::filesystem::path filepath = game.DataPath() / name;