printer_tree BUGFIX lysc_ext.plugin can be NULL
diff --git a/src/printer_tree.c b/src/printer_tree.c
index c498086..6a7e7ce 100644
--- a/src/printer_tree.c
+++ b/src/printer_tree.c
@@ -3795,7 +3795,7 @@
     if (lysc_tree) {
         ce = exts;
         while (*i < LY_ARRAY_COUNT(ce)) {
-            if (trp_ext_parent_is_valid(1, &ce[*i])) {
+            if (ce->def->plugin && trp_ext_parent_is_valid(1, &ce[*i])) {
                 ext = &ce[*i];
                 break;
             }