diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 9be6abced0..9e4a3fae83 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -225,6 +225,10 @@ static int nextId() */ int QHostInfo::lookupHost(const QString &name, QT7_ONLY(const) QObject *receiver, const char *member) { + if (!receiver || !member) { + qWarning("QHostInfo::lookupHost: both the receiver and the member to invoke must be non-null"); + return -1; + } return QHostInfo::lookupHostImpl(name, receiver, nullptr, member); } |