From 19683ade92e5822cf45d1eafd853c107983a1034 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 2 Apr 2023 20:09:25 -0400 Subject: [PATCH] avoid segfault when returning list of fixes by style --- src/modify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modify.cpp b/src/modify.cpp index bfdfba3fbd..9d38c4c898 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -1113,7 +1113,7 @@ const std::vector Modify::get_fix_by_style(const std::string &style) cons if (style.empty()) return matches; for (int ifix = 0; ifix < nfix; ifix++) - if (utils::strmatch(fix[ifix]->style, style)) matches.push_back(fix[ifix]); + if (fix[ifix] && utils::strmatch(fix[ifix]->style, style)) matches.push_back(fix[ifix]); return matches; }