changeset 13314:b12427d2994e

[gaim-migrate @ 15680] SF Patch #1434560 from glommer "This patch prevent gaim from breaking in case MSN_DEBUG_SLP_FILES is on, and you don't have the needed fs infrastructure." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 22 Feb 2006 02:11:02 +0000
parents 403a97caf5c0
children d65250edebe0
files src/protocols/msn/slplink.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/slplink.c	Wed Feb 22 02:08:45 2006 +0000
+++ b/src/protocols/msn/slplink.c	Wed Feb 22 02:11:02 2006 +0000
@@ -47,6 +47,11 @@
 	c = send ? m_sc++ : m_rc++;
 	tmp = g_strdup_printf("%s/msntest/%s/%03d", g_get_home_dir(), dir, c);
 	tf = g_fopen(tmp, "wb");
+	if (tf == NULL)
+	{
+		gaim_debug_error("msn", "could not open debug file");
+		return;
+	}
 	pload = msn_message_gen_payload(msg, &pload_size);
 	fwrite(pload, 1, pload_size, tf);
 	fclose(tf);