summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qhostinfo_p.h12
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 *>(&copy) };
- 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 *>(&copy) };
+ slotObj->call(const_cast<QObject*>(receiver.data()), args);
+ }
slotObj->destroyIfLastRef();
} else {
emit resultsReady(info);