aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Wood <carlo@alinoe.com>2010-12-07 14:29:02 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2010-12-07 14:29:02 +0100
commite8e28926f8de948bce107009aea97d0de0222665 (patch)
tree3bef4841081a290dad9442e34a0b930173a90bf8
parent1ce52ec6a6239efa0327727ffff58c867bb6a4de (diff)
Do not crash when failing to connect to skyped
Hi, when the skype plugin fails to connect to skyped, it crashes. Not crashing is nicer, because that results in an neat error message that connecting to the server failed (and subsequent retries). The attached patch fixes this crash.
-rw-r--r--skype/skype.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/skype/skype.c b/skype/skype.c
index 2c088852..b00344b5 100644
--- a/skype/skype.c
+++ b/skype/skype.c
@@ -151,6 +151,9 @@ int skype_write(struct im_connection *ic, char *buf, int len)
struct skype_data *sd = ic->proto_data;
struct pollfd pfd[1];
+ if (!sd->ssl)
+ return FALSE;
+
pfd[0].fd = sd->fd;
pfd[0].events = POLLOUT;