summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-05-22 15:06:28 -0400
committerGlenn Smith <glenn@vector35.com>2025-05-22 15:10:19 -0400
commit1615831207262558654877273662652860374756 (patch)
tree9d75adda1aaaeefb40e7cec67c8f67d7b9785699 /binaryninjaapi.h
parent9773903467337041452869116900155132108757 (diff)
Fix formatting nullptr
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h2
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); }