Simplify null pointer check

This commit is contained in:
Chocobo1 2019-12-18 15:10:16 +08:00
parent bb73fa5dbe
commit bf264b983a
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
2 changed files with 2 additions and 2 deletions

View file

@ -65,7 +65,7 @@ QVariant HtmlBrowser::loadResource(int type, const QUrl &name)
url.setScheme("http");
QIODevice *dev = m_diskCache->data(url);
if (dev != nullptr) {
if (dev) {
qDebug() << "HtmlBrowser::loadResource() cache " << url.toString();
QByteArray res = dev->readAll();
delete dev;