im.pidgin.pidgin: 42fd8dbdb3b01eba75306887b372141f3bada0fc

rlaager at pidgin.im rlaager at pidgin.im
Sun Jan 13 23:22:37 EST 2008


-----------------------------------------------------------------
Revision: 42fd8dbdb3b01eba75306887b372141f3bada0fc
Ancestor: bb258c91fa9415128114a33cc7a4e71a5a69fd7c
Author: rlaager at pidgin.im
Date: 2008-01-13T21:04:47
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkstatusbox.c

ChangeLog: 

Part of a large patch from o_sukhodolsky to fix some build warnings.
Refs #1344

-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c	d7e0ab285aa24153769221f863fb04d5553f4bd2
+++ pidgin/gtkstatusbox.c	2d7460a161b384756a3d1489b20a88d0773f0396
@@ -320,12 +320,20 @@ statusbox_got_url(PurpleUtilFetchUrlData
 {
 	FILE *f;
 	gchar *path;
+	size_t wc;
 
 	if ((error_message != NULL) || (len == 0))
 		return;
 
 	f = purple_mkstemp(&path, TRUE);
-	fwrite(themedata, len, 1, f);
+	wc = fwrite(themedata, len, 1, f);
+	if (wc != 1) {
+		purple_debug_warning("theme_got_url", "Unable to write theme data.\n");
+		fclose(f);
+		g_unlink(path);
+		g_free(path);
+		return;
+	}
 	fclose(f);
 
 	icon_choose_cb(path, user_data);


More information about the Commits mailing list