diff --git a/plugins/src/main/java/org/tron/plugins/DbQuery.java b/plugins/src/main/java/org/tron/plugins/DbQuery.java index b7b62b09e92..dc393a4fb33 100644 --- a/plugins/src/main/java/org/tron/plugins/DbQuery.java +++ b/plugins/src/main/java/org/tron/plugins/DbQuery.java @@ -84,7 +84,7 @@ private void print(byte[] k, byte[] b) { dbName = this.db.getFileName().toString(); } String key = ByteArray.toHexString(k); - if (b.length == 0) { + if (b == null || b.length == 0) { spec.commandLine().getOut().format("%s\t%s", dbName, key).println(); logger.info("{}\t{}", dbName, key); } else {