Skip to content

Commit

Permalink
Fixed|Client: Qt warns about unexpected null when disconnecting
Browse files Browse the repository at this point in the history
The socket is not created until a connection has been made to a server.
  • Loading branch information
skyjake committed Mar 17, 2013
1 parent 98b6892 commit 64af7e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doomsday/libshell/src/abstractlink.cpp
Expand Up @@ -45,7 +45,10 @@ DENG2_PIMPL(AbstractLink)
~Instance()
{
// Disconnection is implied since the link is being destroyed.
QObject::disconnect(socket.get(), SIGNAL(disconnected()), thisPublic, SLOT(socketDisconnected()));
if(socket.get())
{
QObject::disconnect(socket.get(), SIGNAL(disconnected()), thisPublic, SLOT(socketDisconnected()));
}
}
};

Expand Down

0 comments on commit 64af7e0

Please sign in to comment.