changeset 25739:16ce5da4d823

Properly free audio and video devices in the preferences.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Wed, 27 Aug 2008 07:34:32 +0000
parents 441492fb6b61
children f89bdd34c9f1
files pidgin/gtkprefs.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkprefs.c	Wed Aug 27 06:17:33 2008 +0000
+++ b/pidgin/gtkprefs.c	Wed Aug 27 07:34:32 2008 +0000
@@ -2132,6 +2132,7 @@
 				video_devices, video_devices)) {
 			g_free(video_devices->data);
 		}
+		gst_object_unref(video);
 	}
 
 	if (video_items == NULL) {
@@ -2160,7 +2161,7 @@
 
 	preview_button = gtk_button_new_with_mnemonic(_("_Preview"));
 	g_signal_connect(G_OBJECT(preview_button), "clicked",
-			 G_CALLBACK(preview_button_clicked), video);
+			 G_CALLBACK(preview_button_clicked), NULL);
 
 	gtk_container_add(GTK_CONTAINER(hbox), preview_button);
 
@@ -2241,6 +2242,7 @@
 				video_devices, video_devices)) {
 			g_free(video_devices->data);
 		}
+		gst_object_unref(video);
 	}
 
 	if (audio != NULL) {		
@@ -2250,6 +2252,7 @@
 				audio_devices, audio_devices)) {
 			g_free(audio_devices->data);
 		}
+		gst_object_unref(audio);
 	}
 
 	if (video_items == NULL) {
@@ -2300,7 +2303,7 @@
 
 	preview_button = gtk_button_new_with_mnemonic(_("_Preview"));
 	g_signal_connect(G_OBJECT(preview_button), "clicked",
-			G_CALLBACK(preview_button_clicked), video);
+			G_CALLBACK(preview_button_clicked), NULL);
 
 	gtk_container_add(GTK_CONTAINER(hbox), preview_button);
 	gtk_container_add(GTK_CONTAINER(vbox), hbox);