Showing the changes to interface/src/scripting/GooglePolyScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -151,6 +151,10 @@ QVariant GooglePolyScriptingInterface::parseJSON(QUrl url, int fileType) { · 150 unmodified lines | ||
| 151 | 151 | QByteArray jsonString = getHTTPRequest(url); |
| 152 | 152 | QJsonDocument doc = QJsonDocument::fromJson(jsonString); |
| 153 | 153 | QJsonObject obj = doc.object(); |
| 154 | + if (obj.isEmpty()) { | |
| 155 | + qCDebug(scriptengine) << "Assets with specified filters not found"; | |
| 156 | + return ""; | |
| 157 | + } | |
| 154 | 158 | if (obj.keys().first() == "error") { |
| 155 | 159 | QString error = obj.value("error").toObject().value("message").toString(); |
| 156 | 160 | qCDebug(scriptengine) << error; |