diff --git a/src/item_location.cpp b/src/item_location.cpp index c2ed35a9eb217..e8028f775aa2f 100644 --- a/src/item_location.cpp +++ b/src/item_location.cpp @@ -676,7 +676,8 @@ item_location item_location::parent_item() const if( where() == type::container ) { return ptr->parent_item(); } - return *this; + debugmsg( "this item location type has no parent" ); + return item_location::nowhere; } item_location::type item_location::where() const