Laserlicht 2 mēneši atpakaļ
vecāks
revīzija
87d0c9a3cf
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      client/adventureMap/AdventureMapShortcuts.cpp

+ 2 - 1
client/adventureMap/AdventureMapShortcuts.cpp

@@ -679,5 +679,6 @@ bool AdventureMapShortcuts::optionHeroBoat(EPathfindingLayer layer)
 
 bool AdventureMapShortcuts::optionHeroDig()
 {
-	return optionInMapView() && GAME->interface()->localState->getCurrentHero() != nullptr && GAME->interface()->localState->getCurrentHero()->diggingStatus() == EDiggingStatus::CAN_DIG;
+	auto hero = GAME->interface()->localState->getCurrentHero();
+	return optionInMapView() && hero && hero->diggingStatus() == EDiggingStatus::CAN_DIG;
 }