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