mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
* fixed race condition crash
* no crash when there is no creature in dwelling (that should not happen at all... but) * removed paths from vcxproj, use property sheets
This commit is contained in:
parent
af5287c193
commit
124d732171
@ -205,8 +205,17 @@ std::string getBuildingSubtitle(const CStructure * structure)//hover text for bu
|
||||
return t->town->buildings[structure->building->bid]->Name();
|
||||
else//dwellings - recruit %creature%
|
||||
{
|
||||
int creaID = t->creatures[(bid-30)%GameConstants::CREATURES_PER_TOWN].second.back();//taking last of available creatures
|
||||
return CGI->generaltexth->allTexts[16] + " " + CGI->creh->creatures[creaID]->namePl;
|
||||
auto & availableCreatures = t->creatures[(bid-30)%GameConstants::CREATURES_PER_TOWN].second;
|
||||
if(availableCreatures.size())
|
||||
{
|
||||
int creaID = availableCreatures.back();//taking last of available creatures
|
||||
return CGI->generaltexth->allTexts[16] + " " + CGI->creh->creatures[creaID]->namePl;
|
||||
}
|
||||
else
|
||||
{
|
||||
tlog2 << "Problem: dwelling with id " << bid << " offers no creatures!\n";
|
||||
return "#ERROR#";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,9 +471,13 @@ CGPreGame::CGPreGame():
|
||||
|
||||
CGPreGame::~CGPreGame()
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> lock(*CPlayerInterface::pim);
|
||||
disposeGraphics();
|
||||
if(CGP == this)
|
||||
CGP = nullptr;
|
||||
|
||||
if(GH.curInt == this)
|
||||
GH.curInt = nullptr;
|
||||
}
|
||||
|
||||
void CGPreGame::openSel(CMenuScreen::EState screenType, CMenuScreen::EMultiMode multi /*= CMenuScreen::SINGLE_PLAYER*/)
|
||||
|
@ -92,19 +92,6 @@
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='RD|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='RD|x64'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Lib;$(SolutionDir)..\libs\$(PlatformShortName);$(VCMI_Out);$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|Win32'">
|
||||
<IncludePath>C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RD|x64'">
|
||||
<IncludePath>C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files %28x86%29\Microsoft SDKs\Windows\v7.0A\Include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>/MP4 %(AdditionalOptions)</AdditionalOptions>
|
||||
|
Loading…
Reference in New Issue
Block a user