Skip to content

Commit

Permalink
window data nullptr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Saicchi committed Sep 23, 2021
1 parent 7349837 commit 398f461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4882,6 +4882,7 @@ void prying_activity_actor::handle_prying( Character &who )
return;
}

data = static_cast<const activity_data_common *>( &*furn_type->prying );
if( !difficulty_check( *furn_type->prying ) ) {
handle_failure( furn_type->prying->prying_data() );
return;
Expand All @@ -4895,7 +4896,6 @@ void prying_activity_actor::handle_prying( Character &who )
return;
}

data = static_cast<const activity_data_common *>( &*furn_type->prying );
here.furn_set( target, new_furn );
} else if( !here.ter( target )->is_null() ) {
const ter_id ter_type = here.ter( target );
Expand All @@ -4906,6 +4906,7 @@ void prying_activity_actor::handle_prying( Character &who )
return;
}

data = static_cast<const activity_data_common *>( &*ter_type->prying );
if( !difficulty_check( *ter_type->prying ) ) {
handle_failure( ter_type->prying->prying_data() );
return;
Expand All @@ -4919,7 +4920,6 @@ void prying_activity_actor::handle_prying( Character &who )
return;
}

data = static_cast<const activity_data_common *>( &*ter_type->prying );
here.ter_set( target, new_ter );
} else {
if( !testing ) {
Expand Down

0 comments on commit 398f461

Please sign in to comment.