diff options
author | Liang Qi <liang.qi@qt.io> | 2019-08-05 09:28:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-08-05 09:28:48 +0200 |
commit | f3b28e80211881ab78879eb5acbf5de5d1b1e38c (patch) | |
tree | cf283c7a44bdfc4113d48ec12daa0c3d711aae99 /src/network/kernel | |
parent | 4d7271087e84096abd75fa806bea234daee0cd94 (diff) | |
parent | 8c0787cfa1a906ebe25907515d86050303b127e7 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
qmake/generators/unix/unixmake2.cpp
src/plugins/platforms/cocoa/qcocoawindow.mm
Change-Id: Iba7aa7324f35543e0297a3680956420058cd3630
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index bbf4cc36d1..fa6529bdfd 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -105,12 +105,12 @@ public Q_SLOTS: inline void emitResultsReady(const QHostInfo &info) { if (slotObj) { - // we used to have a context object, but it's already destroyed - if (withContextObject && !receiver) - return; - QHostInfo copy = info; - void *args[2] = { 0, reinterpret_cast<void *>(©) }; - slotObj->call(const_cast<QObject*>(receiver.data()), args); + // we either didn't have a context object, or it's still alive + if (!withContextObject || receiver) { + QHostInfo copy = info; + void *args[2] = { 0, reinterpret_cast<void *>(©) }; + slotObj->call(const_cast<QObject*>(receiver.data()), args); + } slotObj->destroyIfLastRef(); } else { emit resultsReady(info); |