From b11ddbff4c7505de800872a05c001e1da27bd7fa Mon Sep 17 00:00:00 2001 From: andrei Date: Wed, 28 Aug 2024 11:10:47 +0300 Subject: [PATCH] json: don't report unvisited when exiting --- src/flexbuffer_json.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/flexbuffer_json.cpp b/src/flexbuffer_json.cpp index 28c279d04c7f1..11a3cec8f06fa 100644 --- a/src/flexbuffer_json.cpp +++ b/src/flexbuffer_json.cpp @@ -7,6 +7,7 @@ #include "cata_unreachable.h" #include "filesystem.h" +#include "game.h" #include "json.h" namespace @@ -252,6 +253,9 @@ bool JsonValue::read( std::string &s, bool throw_on_error ) const void JsonObject::report_unvisited() const { #ifndef CATA_IN_TOOL + if( g && g->uquit == quit_status::QUIT_EXIT ) { + return; + } if( !std::uncaught_exceptions() && report_unvisited_members && !visited_fields_bitset_.all() ) { std::vector skipped_members; skipped_members.reserve( visited_fields_bitset_.size() );