Closed Nhatorama closed 4 years ago
index 0c3b77a318..eb64c4ff56 100644
--- a/src/armor_layers.cpp
+++ b/src/armor_layers.cpp
@@ -878,6 +878,7 @@ void player::sort_armor()
}
player_character.cancel_activity();
selected = -1;
+ leftListIndex = std::max( 0, leftListIndex - 1 );
}
}
} else if( action == "ASSIGN_INVLETS" ) {
I don't think I'll PR this one
Describe the bug
Removing a “survivor headlamp (on)” from a follower through the “r Sort armor” menu causes a crash/segmentation fault.
Steps To Reproduce
Expected behavior
The game should not crash when removing a followers’ worn items.
Versions and configuration
Additional context
Debug and crash logs cataclysm-dda.zip Save file Alta Vista.zip this is "a save file that occurs in the right conditions, just before the crash happens." To take off the “survivor headlamp (on)” from the follower without causing a crash you need to remove everything else before removing the survivor headlamp. Alas trying to remove the military rucksuck that contains the "survivor headlamp (on)” also causes a crash.