mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
Try to fix possible crash on statistics window
This commit is contained in:
parent
82b81a7853
commit
4912e92f33
@ -274,7 +274,7 @@ void CHighScoreInputScreen::show(Canvas & to)
|
|||||||
|
|
||||||
void CHighScoreInputScreen::clickPressed(const Point & cursorPosition)
|
void CHighScoreInputScreen::clickPressed(const Point & cursorPosition)
|
||||||
{
|
{
|
||||||
if(statisticButton->pos.isInside(cursorPosition))
|
if(statisticButton && statisticButton->pos.isInside(cursorPosition))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OBJECT_CONSTRUCTION;
|
OBJECT_CONSTRUCTION;
|
||||||
@ -288,7 +288,7 @@ void CHighScoreInputScreen::clickPressed(const Point & cursorPosition)
|
|||||||
if(!input)
|
if(!input)
|
||||||
{
|
{
|
||||||
input = std::make_shared<CHighScoreInput>(calc.parameters[0].playerName,
|
input = std::make_shared<CHighScoreInput>(calc.parameters[0].playerName,
|
||||||
[&] (std::string text)
|
[&] (std::string text)
|
||||||
{
|
{
|
||||||
if(!text.empty())
|
if(!text.empty())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user