From db2997f240fb1319cc587e44bc173d0525dfeb2c Mon Sep 17 00:00:00 2001 From: Vasily Postnicov Date: Wed, 7 May 2025 10:31:13 +0300 Subject: [PATCH] Fix incorrect assertion in CArtPlace::setArtifact This fixes a crash in debug builds when the player tries to access a hero's inventory and the hero has a "Summon Boat" spell scroll. --- client/widgets/CComponentHolder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/widgets/CComponentHolder.cpp b/client/widgets/CComponentHolder.cpp index c57209588..adb37b638 100644 --- a/client/widgets/CComponentHolder.cpp +++ b/client/widgets/CComponentHolder.cpp @@ -117,7 +117,7 @@ void CArtPlace::setArtifact(const ArtifactID & newArtId, const SpellID & newSpel if(artId == ArtifactID::SPELL_SCROLL) { spellId = newSpellId; - assert(spellId.num > 0); + assert(spellId != SpellID::NONE); if(settings["general"]["enableUiEnhancements"].Bool()) {