|
@@ -25,6 +25,7 @@ namespace LOTRO_DAT {
|
|
|
dat_id_ = dat_id;
|
|
|
dat_state_ = CLOSED;
|
|
|
root_directory_ = nullptr;
|
|
|
+ file_handler_ = nullptr;
|
|
|
|
|
|
filename_ = filename;
|
|
|
|
|
@@ -418,10 +419,12 @@ namespace LOTRO_DAT {
|
|
|
if (dat_state_ != SUCCESS_DIRECTORIES)
|
|
|
throw DatException("Bad DatFile::MakeDictionary() - DatFile isn't in valid state!", INIT_EXCEPTION);
|
|
|
try {
|
|
|
+ if (root_directory_ == nullptr)
|
|
|
+ throw DatException("Bad DatFile::MakeDictionary() - root_directory is nullptr!", INIT_EXCEPTION);
|
|
|
+
|
|
|
root_directory_->MakeDictionary(dictionary_);
|
|
|
} catch (std::exception &e) {
|
|
|
fprintf(stderr, "Caught %s exception.", e.what());
|
|
|
-
|
|
|
fprintf(stderr, "Bad DatFile::MakeDictionary() - File is corrupted?\n");
|
|
|
return;
|
|
|
}
|
|
@@ -582,11 +585,22 @@ namespace LOTRO_DAT {
|
|
|
CommitChanges();
|
|
|
}
|
|
|
|
|
|
+ orig_dict_.clear();
|
|
|
+ patched_list.clear();
|
|
|
+ pending_patch_.clear();
|
|
|
+
|
|
|
+ current_locale_ = ORIGINAL;
|
|
|
+ filename_.clear();
|
|
|
+
|
|
|
if (file_handler_ != nullptr)
|
|
|
fclose(file_handler_);
|
|
|
delete file_handler_;
|
|
|
|
|
|
delete root_directory_;
|
|
|
+
|
|
|
+ patched_list.clear();
|
|
|
+ dictionary_.clear();
|
|
|
+
|
|
|
dat_state_ = CLOSED;
|
|
|
}
|
|
|
|