diff --git a/src/item.cpp b/src/item.cpp index 3178a2ba17e99..c2de6480dc72c 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -6742,7 +6742,7 @@ std::string item::display_name( unsigned int quantity ) const bool item::is_collapsed() const { - return !contents.get_pockets( []( item_pocket const & pocket ) { + return !contents.empty() && !contents.get_pockets( []( item_pocket const & pocket ) { return pocket.settings.is_collapsed() && pocket.is_standard_type(); } ).empty(); }