Fix #13816: Compilation failure on Launchpad (#13837)

This commit is contained in:
Michał Janiszewski 2021-01-14 23:19:10 +01:00 committed by GitHub
parent 78f6e3e8e3
commit f1a5e62440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -195,7 +195,12 @@ bool ViewportInteractionLeftClick(const ScreenCoordsXY& screenCoords)
case SpriteIdentifier::Misc:
if (game_is_not_paused())
{
switch (entity->As<MiscEntity>()->SubType)
auto miscEntity = entity->As<MiscEntity>();
if (miscEntity == nullptr)
{
break;
}
switch (miscEntity->SubType)
{
case MiscEntityType::Balloon:
{