[repacker] begin implementing a fuzzer for the repacker api.
diff --git a/src/graph/graph.hh b/src/graph/graph.hh
index c6f0884..20d6463 100644
--- a/src/graph/graph.hh
+++ b/src/graph/graph.hh
@@ -941,6 +941,18 @@
     return made_change;
   }
 
+  bool is_fully_connected ()
+  {
+    update_parents();
+
+    for (unsigned i = 0; i < root_idx (); i++)
+    {
+      if (!vertices_[i].parents)
+        return false;
+    }
+    return true;
+  }
+
   void print_orphaned_nodes ()
   {
     if (!DEBUG_ENABLED(SUBSET_REPACK)) return;
diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh
index 70f1d0e..ba30557 100644
--- a/src/hb-repacker.hh
+++ b/src/hb-repacker.hh
@@ -376,6 +376,12 @@
                       unsigned max_rounds = 20,
                       bool recalculate_extensions = false) {
   graph_t sorted_graph (packed);
+  if (!sorted_graph.is_fully_connected ())
+  {
+    DEBUG_MSG (SUBSET_REPACK, nullptr, "Input graph is not fully connected.");
+    return nullptr;
+  }
+
   if (!hb_resolve_graph_overflows (table_tag, max_rounds, recalculate_extensions, sorted_graph))
     return nullptr;