message: Dereference of null pointer
  add an assert to make sure that `key_field` is not a null pointer.
diff: @@ -1450,6 +1450,7 @@ class GeneralGenerator : public BaseGenerator {
  // Only generate key compare function for table,
  // because `key_field` is not set for struct
  if (struct_def.has_key && !struct_def.fixed) {
  + FLATBUFFERS_ASSERT(key_field);
  if (lang_.language == IDLOptions::kJava) {
  code += "\n @Override\n protected int keysCompare(";
  code += "Integer o1, Integer o2, ByteBuffer _bb) {";
  