changeset 8381:95afeb9a0c96

[gaim-migrate @ 9109] Thanks wing committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 02 Mar 2004 04:59:33 +0000
parents 4a5b36510665
children 82d7852d35e1
files src/gtkutils.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Mon Mar 01 20:52:57 2004 +0000
+++ b/src/gtkutils.c	Tue Mar 02 04:59:33 2004 +0000
@@ -273,6 +273,10 @@
 	GaimGtkConversation *gtkconv;
 	FILE *file;
 	const char *f;
+	GaimBuddyIcon *icon;
+	size_t len;
+	const void *data;
+
 
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 
@@ -282,9 +286,8 @@
 	if (gaim_gtk_check_if_dir(f, GTK_FILE_SELECTION(gtkconv->u.im->save_icon)))
 		return;
 
-	GaimBuddyIcon *icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c));
-	size_t len;
-	const void *data = gaim_buddy_icon_get_data(icon, &len);
+	icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c));
+	data = gaim_buddy_icon_get_data(icon, &len);
 
 	if ((len > 0) && (data != NULL) && (file = fopen(f, "wb")) != NULL) {
 		fwrite(data, 1, len, file);