Don't try to pull invalid data from JSON

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7494
This commit is contained in:
Jon Evans 2021-02-11 17:18:09 -05:00
parent 10442b98df
commit af7e4c6ca0
1 changed files with 1 additions and 1 deletions

View File

@ -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<std::string>().c_str(), wxConvUTF8 ) );
aPair.second = wxString( aJson[1].get<std::string>().c_str(), wxConvUTF8 );
}