fix #1850: segfault when using ledger print
fix #1850: segfault when using ledger print

ledger/ledger,ledger/ledger,ledger/ledger,afh/ledger,ledger/ledger,ledger/ledger,afh/ledger,afh/ledger,afh/ledger,afh/ledger