From 3a066fd865168cc0e5d2ef4e44dd39256e87876b Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Sat, 29 Mar 2025 01:25:45 +0000 Subject: __throw_if_error should imply __throw_if_null --- libnvxx/nvxx.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnvxx/nvxx.cc b/libnvxx/nvxx.cc index 43c983c..4ccd51f 100644 --- a/libnvxx/nvxx.cc +++ b/libnvxx/nvxx.cc @@ -48,6 +48,8 @@ __nv_list_base::__free_nv() noexcept void __nv_list_base::__throw_if_error() const { + __throw_if_null(); + if (auto err = ::nvlist_error(__m_nv); err != 0) throw nv_error_state(std::error_code(err, std::generic_category())); } -- cgit v1.2.3