diff --git a/src/net/listen.c b/src/net/listen.c
index f3300ab6c2cb3c11f5974d6915f80b6727d1807c..700f73fbc4b34817d423879dbda0e96b7c8e7e79 100644
--- a/src/net/listen.c
+++ b/src/net/listen.c
@@ -126,7 +126,12 @@ ___cmd_trie_print(struct cmd_trie_node *root, char *old_prefix, const size_t len
     memcpy(prefix, old_prefix, sizeof(char) * length);
     prefix[length + 1] = '\0';
     prefix[length]     = '\0';
-    LKT_OUTPUT("CMD_TRIE", "Got function in trie '%s'", prefix);
+
+    /* Found a command? */
+    if (root->cmd_ptr != NULL) {
+        LKT_OUTPUT("CMD_TRIE", "Got function in trie '%s'", prefix);
+    }
+
     for (size_t i = 0; i < CHARS_MAX; ++i) {
         /* Rec-call with new children */
         if (root->children[i] != NULL) {