diff options
-rw-r--r-- | include/osmocom/core/fsm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 5bf5328e..df7e3486 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 * |