diff --git a/Data Files/Changelog.txt b/Data Files/Changelog.txt index 636299c2e..f4d5aca92 100644 --- a/Data Files/Changelog.txt +++ b/Data Files/Changelog.txt @@ -313,8 +313,8 @@ Revision Log Message 307 HRE Electors 308 Add Jerusalem1401 save (from 1.09) 309 Better warning message when unable to determine culture or religion. - - +310 Fix crash bug from HRE title being destroyed +311 Fix resaving bug 312 Process many things only after assigning tags 313 Solve some cases of governments not being assigned 314 More government adjustments diff --git a/Source/CK2World/CK2World.cpp b/Source/CK2World/CK2World.cpp index 0f2e8b1a9..0c19f80f3 100644 --- a/Source/CK2World/CK2World.cpp +++ b/Source/CK2World/CK2World.cpp @@ -26,9 +26,12 @@ CK2World::CK2World() dynasties.clear(); characters.clear(); traits.clear(); + potentialTitles.clear(); titles.clear(); + hreTitle = NULL; provinces.clear(); baronies.clear(); + wars.clear(); } diff --git a/Source/EU3World/EU3Country.cpp b/Source/EU3World/EU3Country.cpp index 5fcf84a74..b7c32a89f 100644 --- a/Source/EU3World/EU3Country.cpp +++ b/Source/EU3World/EU3Country.cpp @@ -657,7 +657,7 @@ void EU3Country::output(FILE* output) { fprintf(output, "\tgalley=\"%s\"\n", galley.c_str()); } - if(infantry != "") + if(transport != "") { fprintf(output, "\ttransport=\"%s\"\n", transport.c_str()); } diff --git a/Source/EU3World/EU3World.cpp b/Source/EU3World/EU3World.cpp index 66133c84a..c2200e269 100644 --- a/Source/EU3World/EU3World.cpp +++ b/Source/EU3World/EU3World.cpp @@ -217,8 +217,8 @@ EU3World::EU3World(CK2World* _srcWorld, EU3Tech* _techData) options[LUCKY_NATIONS] = 2; } - diplomacy = new EU3Diplomacy(); - + diplomacy = new EU3Diplomacy(); + hreEmperor = NULL; japaneseEmperor = NULL; daimyos.clear(); shogun = NULL; @@ -244,7 +244,10 @@ void EU3World::output(FILE* output) fprintf(output, "}\n"); fprintf(output, "start_date=\"%s\"\n", startDate.toString().c_str()); outputTempHeader2(output); - fprintf(output, "emperor=\"%s\"\n", hreEmperor->getTag().c_str()); + if (hreEmperor != NULL) + { + fprintf(output, "emperor=\"%s\"\n", hreEmperor->getTag().c_str()); + } fprintf(output, "imperial_influence=20.000\n"); fprintf(output, "internal_hre_cb=yes\n"); for (map::iterator i = provinces.begin(); i != provinces.end(); i++)