summaryrefslogtreecommitdiff
path: root/src/irmd/api_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/api_table.c')
-rw-r--r--src/irmd/api_table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irmd/api_table.c b/src/irmd/api_table.c
index 1c655004..5ff0fcf6 100644
--- a/src/irmd/api_table.c
+++ b/src/irmd/api_table.c
@@ -185,7 +185,8 @@ int api_entry_sleep(struct api_entry * e)
&dl);
if (e->state == API_DESTROY) {
- reg_entry_del_api(e->re, e->api);
+ if (e->re != NULL)
+ reg_entry_del_api(e->re, e->api);
ret = -1;
}