Skip to content

Commit

Permalink
Merge pull request #33467 from ipcyborg/fix-compile-gcc-7.4
Browse files Browse the repository at this point in the history
Fixed compilation with gcc 7.4.
  • Loading branch information
ZhilkinSerg authored Aug 22, 2019
2 parents 2bda93b + a6ff92d commit 82197cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11678,8 +11678,9 @@ void game::add_artifact_dreams( )
for( auto &it : art_items ) {
//Pick only the ones with an applicable dream
auto art = it->type->artifact;
if( art->charge_req != ACR_NULL && ( it->ammo_remaining() < it->ammo_capacity() ||
it->ammo_capacity() == 0 ) ) { //or max 0 in case of wacky mod shenanigans
if( art.has_value() && art->charge_req != ACR_NULL &&
( it->ammo_remaining() < it->ammo_capacity() ||
it->ammo_capacity() == 0 ) ) { //or max 0 in case of wacky mod shenanigans
add_msg( m_debug, "Checking artifact %s", it->tname() );
if( check_art_charge_req( *it ) ) {
add_msg( m_debug, " Has freq %s,%s", art->dream_freq_met, art->dream_freq_unmet );
Expand Down

0 comments on commit 82197cf

Please sign in to comment.