lyb parser BUGFIX NULL dereference
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index b011d8a..070c9c3 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -330,8 +330,10 @@
 
     }
 
-    /* fill cached hashes, if not already */
-    lyb_cache_module_hash(*mod);
+    if (*mod) {
+        /* fill cached hashes, if not already */
+        lyb_cache_module_hash(*mod);
+    }
 
 cleanup:
     free(mod_name);