From c0d79e49c3609580c62fc31237f925085dabc34e Mon Sep 17 00:00:00 2001 From: Bartek Wrona Date: Sat, 18 Jan 2025 18:51:42 +0100 Subject: [PATCH] Issue #392 Fixed crash when debuginfo file was passed to the tool. --- src/bloaty.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bloaty.h b/src/bloaty.h index f7a49d7..e6ebe95 100644 --- a/src/bloaty.h +++ b/src/bloaty.h @@ -279,7 +279,8 @@ class ObjectFile { // Sets the debug file for |this|. |file| must outlive this instance. void set_debug_file(const ObjectFile* file) { - assert(debug_file_->GetBuildId() == GetBuildId()); + assert(file != nullptr); + assert(file->GetBuildId() == GetBuildId()); debug_file_ = file; }