Fix another null buffer problem when closing ledger buffers
Merge commit '3d90bfc4add2a85b80c2a90b7c0df9b95d77579d' into next