diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 7711589..620b11a 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -350,9 +350,12 @@ class jsonGallery : public BinaryGallery Template readTemplate() { QJsonParseError error; - File file = QJsonDocument::fromJson(gallery.readLine(), &error).object().toVariantMap(); - if (error.error != QJsonParseError::NoError) + const QByteArray line = gallery.readLine(); + File file = QJsonDocument::fromJson(line, &error).object().toVariantMap(); + if (error.error != QJsonParseError::NoError) { + qWarning("Couldn't parse: %s\n", line.data()); qFatal("%s\n", qPrintable(error.errorString())); + } return file; }