diff --git a/crypto/vm/stack.cpp b/crypto/vm/stack.cpp index c580a3d0..9a17c8e2 100644 --- a/crypto/vm/stack.cpp +++ b/crypto/vm/stack.cpp @@ -90,15 +90,27 @@ void StackEntry::dump(std::ostream& os) const { os << dec_string(as_int()); break; case t_cell: - os << "C{" << static_cast>(ref)->get_hash().to_hex() << "}"; + if (ref.not_null()) { + os << "C{" << static_cast>(ref)->get_hash().to_hex() << "}"; + } else { + os << "C{null}"; + } break; case t_builder: - os << "BC{" << static_cast>(ref)->to_hex() << "}"; + if (ref.not_null()) { + os << "BC{" << static_cast>(ref)->to_hex() << "}"; + } else { + os << "BC{null}"; + } break; case t_slice: { - os << "CS{"; - static_cast>(ref)->dump(os, 1, false); - os << '}'; + if (ref.not_null()) { + os << "CS{"; + static_cast>(ref)->dump(os, 1, false); + os << '}'; + } else { + os << "CS{null}"; + } break; } case t_string: