diff --git a/src/t8_forest/t8_forest.cxx b/src/t8_forest/t8_forest.cxx index f66522f471..51a29d1254 100644 --- a/src/t8_forest/t8_forest.cxx +++ b/src/t8_forest/t8_forest.cxx @@ -1466,6 +1466,11 @@ t8_gloidx_t t8_forest_element_face_neighbor (t8_forest_t forest, t8_locidx_t ltreeid, const t8_element_t *elem, t8_element_t *neigh, t8_eclass_t neigh_eclass, int face, int *neigh_face) { + int dummy = 0; + if (neigh_face == nullptr) { + neigh_face = &dummy; + } + /* Get a pointer to the tree to read its element class */ const t8_tree_t tree = t8_forest_get_tree (forest, ltreeid); const t8_eclass_t eclass = tree->eclass; diff --git a/src/t8_forest/t8_forest_general.h b/src/t8_forest/t8_forest_general.h index b57878b920..9301e3eb98 100644 --- a/src/t8_forest/t8_forest_general.h +++ b/src/t8_forest/t8_forest_general.h @@ -861,7 +861,7 @@ t8_forest_element_neighbor_eclass (t8_forest_t forest, t8_locidx_t ltreeid, cons * the data could be modified arbitrarily. * \param [in] neigh_eclass The eclass of \a neigh. * \param [in] face The number of the face along which the neighbor should be constructed. - * \param [out] neigh_face The number of the face viewed from perspective of \a neigh. + * \param [out] neigh_face The number of the face viewed from perspective of \a neigh. Can be nullptr. * \return The global tree-id of the tree in which \a neigh is in. * -1 if there exists no neighbor across that face. */