From fe4171eb639746ee9c6250ec8d97f1e86db7f283 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= <mwu-tow@gazeta.pl>
Date: Sat, 1 Mar 2014 17:41:29 +0000
Subject: [PATCH] Fixed #1719.

---
 lib/CGameState.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp
index 1a0ecaacd..57d02254c 100644
--- a/lib/CGameState.cpp
+++ b/lib/CGameState.cpp
@@ -1355,9 +1355,10 @@ void CGameState::prepareCrossoverHeroes(std::vector<CGameState::CampaignHeroRepl
 				int id  = art->artType->id;
 				assert( 8*18 > id );//number of arts that fits into h3m format
 				bool takeable = travelOptions.artifsKeptByHero[id / 8] & ( 1 << (id%8) );
-
-				if(!takeable) 
-					ArtifactLocation(hero, artifactPosition).removeArtifact();
+				
+				ArtifactLocation al(hero, artifactPosition);
+				if(!takeable  &&  !al.getSlot()->locked)  //don't try removing locked artifacts -> it crashes #1719
+					al.removeArtifact();
 			}
 		}
 	}