mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix crash on attempt to access not visible tile
This commit is contained in:
		| @@ -173,8 +173,10 @@ void MapAudioPlayer::updateMusic() | ||||
| { | ||||
| 	if(audioPlaying && playerMakingTurn && currentSelection) | ||||
| 	{ | ||||
| 		const auto * terrain = LOCPLINT->cb->getTile(currentSelection->visitablePos())->terType; | ||||
| 		CCS->musich->playMusicFromSet("terrain", terrain->getJsonKey(), true, false); | ||||
| 		const auto * tile = LOCPLINT->cb->getTile(currentSelection->visitablePos()); | ||||
|  | ||||
| 		if (tile) | ||||
| 			CCS->musich->playMusicFromSet("terrain", tile->terType->getJsonKey(), true, false); | ||||
| 	} | ||||
|  | ||||
| 	if(audioPlaying && enemyMakingTurn) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user