From af7e4c6ca070aa73a0138239c1d4eff64f3b2d81 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 11 Feb 2021 17:18:09 -0500 Subject: [PATCH] Don't try to pull invalid data from JSON Fixes https://gitlab.com/kicad/code/kicad/-/issues/7494 --- common/project/project_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/project/project_file.cpp b/common/project/project_file.cpp index 72f07a05e4..2c65b9393d 100644 --- a/common/project/project_file.cpp +++ b/common/project/project_file.cpp @@ -570,7 +570,7 @@ void to_json( nlohmann::json& aJson, const FILE_INFO_PAIR& aPair ) void from_json( const nlohmann::json& aJson, FILE_INFO_PAIR& aPair ) { - wxASSERT( aJson.is_array() && aJson.size() == 2 ); + wxCHECK( aJson.is_array() && aJson.size() == 2, /* void */ ); aPair.first = KIID( wxString( aJson[0].get().c_str(), wxConvUTF8 ) ); aPair.second = wxString( aJson[1].get().c_str(), wxConvUTF8 ); }