summaryrefslogtreecommitdiffstats
path: root/client/tunnel_channel.cpp
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-11-09 19:21:00 +0200
committerYaniv Kamay <ykamay@redhat.com>2009-11-09 22:14:47 +0200
commit1121d8c6293b5fc79e19bbfb477b611a5ba22359 (patch)
tree32dbaf9a568a73a758b9b93dbfb783c28ea88b1e /client/tunnel_channel.cpp
parente74de7834dda657966f209b2cb23b145773a915f (diff)
downloadspice-1121d8c6293b5fc79e19bbfb477b611a5ba22359.tar.gz
spice-1121d8c6293b5fc79e19bbfb477b611a5ba22359.tar.xz
spice-1121d8c6293b5fc79e19bbfb477b611a5ba22359.zip
spice client: tunnel channel - checking that the configuration pipe listener was created before deleting it
Diffstat (limited to 'client/tunnel_channel.cpp')
-rw-r--r--client/tunnel_channel.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/tunnel_channel.cpp b/client/tunnel_channel.cpp
index 08556c67..b6455a61 100644
--- a/client/tunnel_channel.cpp
+++ b/client/tunnel_channel.cpp
@@ -230,6 +230,9 @@ TunnelChannel::TunnelChannel(RedClient& client, uint32_t id)
, _max_socket_data_size(0)
, _service_id(0)
, _service_group(0)
+#ifdef TUNNEL_CONFIG
+ , _config_listener (NULL)
+#endif
{
TunnelHandler* handler = static_cast<TunnelHandler*>(get_message_handler());
@@ -585,7 +588,6 @@ void TunnelChannel::destroy_sockets()
void TunnelChannel::on_connect()
{
_config_listener = new TunnelConfigListenerIfc(*this);
-
}
#endif
@@ -594,7 +596,10 @@ void TunnelChannel::on_disconnect()
destroy_sockets();
OutSocketMessage::clear_free_messages();
#ifdef TUNNEL_CONFIG
- delete _config_listener;
+ if (_config_listener) {
+ delete _config_listener;
+ _config_listener = NULL;
+ }
#endif
}