tree schema BUGFIX use initialized context for logging
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 25c4d64..6f45540 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -609,7 +609,7 @@
         ret = yang_parse_submodule(&context, ctx, main_ctx, data, &submod);
         break;
     default:
-        LOGERR((*context).ctx, LY_EINVAL, "Invalid schema input format.");
+        LOGERR(ctx, LY_EINVAL, "Invalid schema input format.");
         break;
     }
     LY_CHECK_RET(ret, NULL);