diff options
| author | Glenn Smith <glenn@vector35.com> | 2025-05-22 15:06:28 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2025-05-22 15:10:19 -0400 |
| commit | 1615831207262558654877273662652860374756 (patch) | |
| tree | 9d75adda1aaaeefb40e7cec67c8f67d7b9785699 /binaryninjaapi.h | |
| parent | 9773903467337041452869116900155132108757 (diff) | |
Fix formatting nullptr
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index ff23cbd2..942f9d56 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -20976,6 +20976,8 @@ template<typename T> struct fmt::formatter<BinaryNinja::Ref<T>> fmt::formatter<T> inner; format_context::iterator format(const BinaryNinja::Ref<T>& obj, format_context& ctx) const { + if (obj.GetPtr() == nullptr) + return fmt::format_to(ctx.out(), "{}", "<null>"); return inner.format(*obj.GetPtr(), ctx); } constexpr auto parse(format_parse_context& ctx) -> format_parse_context::iterator { return inner.parse(ctx); } |
