mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-11 11:31:52 +02:00
Fix crash on accessing not yet created object
This commit is contained in:
parent
ac839ad26a
commit
c302efd315
@ -186,7 +186,7 @@ public:
|
||||
uint8_t(std::min(255.f, std::round(input.r * float(factor.r) / 255.f + added.r))),
|
||||
uint8_t(std::min(255.f, std::round(input.g * float(factor.g) / 255.f + added.g))),
|
||||
uint8_t(std::min(255.f, std::round(input.b * float(factor.b) / 255.f + added.b))),
|
||||
uint8_t(std::min(255.f, std::round(input.a * float(factor.a) / 255.f + added.a))),
|
||||
uint8_t(std::min(255.f, std::round(input.a * float(factor.a) / 255.f + added.a)))
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -369,10 +369,11 @@ CMultiMode::CMultiMode(ESelectionScreen ScreenType)
|
||||
: screenType(ScreenType)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
pos = background->center(); //center, window has size of bg graphic
|
||||
|
||||
background = std::make_shared<CPicture>("MUPOPUP.bmp");
|
||||
picture = std::make_shared<CPicture>("MUMAP.bmp", 16, 77);
|
||||
pos = background->center(); //center, window has size of bg graphic
|
||||
|
||||
picture = std::make_shared<CPicture>("MUMAP.bmp", 16, 77);
|
||||
|
||||
statusBar = CGStatusBar::create(std::make_shared<CPicture>(background->getSurface(), Rect(7, 465, 440, 18), 7, 465));
|
||||
playerName = std::make_shared<CTextInput>(Rect(19, 436, 334, 16), background->getSurface());
|
||||
|
Loading…
x
Reference in New Issue
Block a user