Skip to content

Commit

Permalink
Fix crash when opening construction menu with no visible entries (Cle…
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrox authored May 14, 2024
1 parent fc1c48f commit c7d88dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/construction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ construction_id construction_menu( const bool blueprint )

if( select < 0 || static_cast<size_t>( select ) >= constructs.size()
|| con_preview_group != constructs[select] ) {
con_preview_group = ( select >= 0 || static_cast<size_t>( select ) < constructs.size() )
con_preview_group = ( select >= 0 && static_cast<size_t>( select ) < constructs.size() )
? constructs[select] : construction_group_str_id::NULL_ID();
if( con_preview_group.is_null() ) {
con_preview.clear();
Expand Down

0 comments on commit c7d88dc

Please sign in to comment.