diff --git a/include/rocksdb/utilities/object_registry.h b/include/rocksdb/utilities/object_registry.h index a5c4b36c5..425ed2653 100644 --- a/include/rocksdb/utilities/object_registry.h +++ b/include/rocksdb/utilities/object_registry.h @@ -570,10 +570,10 @@ class ObjectRegistry { } } } - if (parent_ != nullptr) { - return parent_->FindFactory(name); - } else { + if (parent_ == nullptr) { return nullptr; + } else { + return parent_->FindFactory(name); } }