1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #2529 from IvanSavenko/hero_defeat_fix

Fix potential access to empty std function on hero vs hero combat
This commit is contained in:
Ivan Savenko 2023-08-11 11:37:12 +03:00 committed by GitHub
commit 8ba3f771be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -636,7 +636,9 @@ void BattleResultWindow::show(Canvas & to)
void BattleResultWindow::buttonPressed(int button)
{
resultCallback(button);
if (resultCallback)
resultCallback(button);
CPlayerInterface &intTmp = owner; //copy reference because "this" will be destructed soon
close();