schema BUGFIX dereferencing possible NULL pointers
diff --git a/src/schema_compile.c b/src/schema_compile.c
index 17f3158..f0206d0 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -364,7 +364,7 @@
 
     if (!ctx_sc) {
         context.ctx = ctx;
-        context.cur_mod = parsed_mod->mod;
+        context.cur_mod = parsed_mod ? parsed_mod->mod : NULL;
         context.pmod = parsed_mod;
         context.path_len = 1;
         context.path[0] = '/';