diff --git a/src/peep/peep.c b/src/peep/peep.c index b2611441d9..51bfe6b04d 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -426,6 +426,9 @@ static uint8 peep_assess_surroundings(sint16 center_x, sint16 center_y, sint16 c break; scenery = get_footpath_item_entry(footpath_element_get_path_scenery_index(mapElement)); + if (scenery == NULL) { + return PEEP_THOUGHT_TYPE_NONE; + } if (footpath_element_path_scenery_is_ghost(mapElement)) break;