summaryrefslogtreecommitdiffstats
path: root/src/fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fsm.c')
-rw-r--r--src/fsm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fsm.c b/src/fsm.c
index c5256da5..88de0116 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -119,7 +119,12 @@ struct osmo_fsm_inst *osmo_fsm_inst_find_by_name(const struct osmo_fsm *fsm,
{
struct osmo_fsm_inst *fi;
+ if (!name)
+ return NULL;
+
llist_for_each_entry(fi, &fsm->instances, list) {
+ if (!fi->name)
+ continue;
if (!strcmp(name, fi->name))
return fi;
}