Skip to content

Commit b726a11

Browse files
authored
Fix potential null pointer dereference (#117)
1 parent e56ebdf commit b726a11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/OversetSimulation.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ class OversetSimulation
106106
//! set number of nalu-wind instances
107107
void set_nw_start_rank(const std::vector<int>& start_ranks)
108108
{
109-
m_nw_start_rank = start_ranks;
109+
if (!start_ranks.empty()) {
110+
m_nw_start_rank = start_ranks;
111+
} else {
112+
m_nw_start_rank.clear();
113+
}
110114
m_num_nw_solvers = m_nw_start_rank.size();
111115
}
112116

0 commit comments

Comments
 (0)