mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Check for empty string in CutterCore::cmdj()
This commit is contained in:
parent
b0137892cd
commit
be54694877
@ -206,6 +206,12 @@ QJsonDocument CutterCore::cmdj(const QString &str)
|
||||
|
||||
QString resString = QString(res);
|
||||
|
||||
if (resString.isEmpty())
|
||||
{
|
||||
r_mem_free(res);
|
||||
return QJsonDocument();
|
||||
}
|
||||
|
||||
QJsonParseError jsonError;
|
||||
QJsonDocument doc = res ? QJsonDocument::fromJson(resString.toUtf8(), &jsonError) : QJsonDocument();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user