Fixed compile errors, closed issue #19

This commit is contained in:
WrinklyNinja
2013-05-18 22:54:26 +01:00
parent f50e822266
commit 310d917d23
2 changed files with 37 additions and 16 deletions
+37 -11
View File
@@ -231,20 +231,33 @@ namespace boss {
else if (Id() == GAME_FONV)
ret = lo_create_handle(&gh, LIBLO_GAME_FNV, gamePath.string().c_str());
if (ret != LIBLO_OK)
throw error(ERROR_LIBLO_ERROR, "libloadorder game handle creation failed.");
if (ret != LIBLO_OK) {
const char * err;
lo_get_error_message(&err);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, err);
}
ret = lo_set_game_master(gh, _masterFile.c_str());
if (ret != LIBLO_OK)
if (ret != LIBLO_OK) {
const char * err;
lo_get_error_message(&err);
lo_destroy_handle(gh);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, "libloadorder total conversion support setup failed.");
}
if (lo_get_active_plugins(gh, &pluginArr, &pluginArrSize) != LIBLO_OK)
throw error(ERROR_LIBLO_ERROR, "Active plugin list lookup failed.");
else {
for (size_t i=0; i < pluginArrSize; ++i) {
activePlugins.insert(string(pluginArr[i]));
}
if (lo_get_active_plugins(gh, &pluginArr, &pluginArrSize) != LIBLO_OK) {
const char * err;
lo_get_error_message(&err);
lo_destroy_handle(gh);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, err);
}
for (size_t i=0; i < pluginArrSize; ++i) {
activePlugins.insert(string(pluginArr[i]));
}
lo_destroy_handle(gh);
@@ -269,13 +282,22 @@ namespace boss {
else if (Id() == GAME_FONV)
ret = lo_create_handle(&gh, LIBLO_GAME_FNV, gamePath.string().c_str());
if (ret != LIBLO_OK)
if (ret != LIBLO_OK) {
const char * err;
lo_get_error_message(&err);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, "libloadorder game handle creation failed.");
}
ret = lo_set_game_master(gh, _masterFile.c_str());
if (ret != LIBLO_OK)
if (ret != LIBLO_OK) {
const char * err;
lo_get_error_message(&err);
lo_destroy_handle(gh);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, "libloadorder total conversion support setup failed.");
}
pluginArrSize = loadOrder.size();
pluginArr = new char*[pluginArrSize];
@@ -290,6 +312,10 @@ namespace boss {
for (size_t i=0; i < pluginArrSize; i++)
delete [] pluginArr[i];
delete [] pluginArr;
const char * err;
lo_get_error_message(&err);
lo_destroy_handle(gh);
lo_cleanup();
throw error(ERROR_LIBLO_ERROR, "Setting load order failed.");
}
-5
View File
@@ -65,11 +65,6 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node
LanguageChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 1, Language);
DebugVerbosityChoice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, DebugVerbosity);
OblivionURL = new wxTextCtrl(this, wxID_ANY);
SkyrimURL = new wxTextCtrl(this, wxID_ANY);
FO3URL = new wxTextCtrl(this, wxID_ANY);
FONVURL = new wxTextCtrl(this, wxID_ANY);
UpdateMasterlistBox = new wxCheckBox(this, wxID_ANY, translate("Update masterlist before sorting."));
reportViewBox = new wxCheckBox(this, wxID_ANY, translate("View reports externally in default browser."));