[nostalgia/studio] Fix JSON errors to only display when error occurs

This commit is contained in:
Gary Talent 2020-02-16 13:45:06 -06:00
parent 1269ee7fad
commit 2fb0ddf709

View File

@ -93,8 +93,8 @@ template<typename T>
ox::Error readJson(QString json, T *dest) {
QJsonParseError err;
auto obj = QJsonDocument::fromJson(json.toUtf8(), &err).object();
qDebug() << "JSON parsing error:" << err.errorString();
if (err.error) {
qDebug() << "JSON parsing error:" << err.errorString();
return OxError(1);
}
JsonReader rdr(obj);