aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-01-22 00:22:17 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-01-29 00:59:32 +0100
commit56632b69a766f52de6a289e1d7c8a367c98af757 (patch)
treea6836d0c1798c72054745d3c0ab58622cac4bd53 /include/osmocom/core
parent7740d26d7e6a3ee963cafadae8fc6d0ef7e7d21b (diff)
osmo_fsm_state_name: make robust against NULL fi
Diffstat (limited to 'include/osmocom/core')
-rw-r--r--include/osmocom/core/fsm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index 5bf5328..df7e348 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -220,7 +220,7 @@ const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state);
/*! return the name of the state the FSM instance is currently in. */
static inline const char *osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi)
-{ return osmo_fsm_state_name(fi->fsm, fi->state); }
+{ return fi ? osmo_fsm_state_name(fi->fsm, fi->state) : "NULL"; }
/*! perform a state change of the given FSM instance
*