cheese r807 - in trunk: . src
- From: fargiolas svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r807 - in trunk: . src
- Date: Tue, 22 Jul 2008 12:57:05 +0000 (UTC)
Author: fargiolas
Date: Tue Jul 22 12:57:05 2008
New Revision: 807
URL: http://svn.gnome.org/viewvc/cheese?rev=807&view=rev
Log:
Don't try to access selected_device->video_device if there is no device Fixes bug #544062
Modified:
trunk/ChangeLog
trunk/src/cheese-prefs-webcam-combo.c
Modified: trunk/src/cheese-prefs-webcam-combo.c
==============================================================================
--- trunk/src/cheese-prefs-webcam-combo.c (original)
+++ trunk/src/cheese-prefs-webcam-combo.c Tue Jul 22 12:57:05 2008
@@ -128,13 +128,14 @@
/* If the selected device is not the same device as the one in gconf, the
selected device isn't available or was set by --hal-device. Set it now.
Not sure if this is desired behavior */
- g_object_get (prefs_widget->gconf, priv->webcam_device_key, &gconf_device_name, NULL);
- if (strcmp(selected_device->video_device, gconf_device_name) != 0)
- {
- g_object_set(prefs_widget->gconf, priv->webcam_device_key, selected_device->video_device, NULL);
+ if (num_devices > 0) {
+ g_object_get (prefs_widget->gconf, priv->webcam_device_key, &gconf_device_name, NULL);
+ if (strcmp(selected_device->video_device, gconf_device_name) != 0)
+ {
+ g_object_set(prefs_widget->gconf, priv->webcam_device_key, selected_device->video_device, NULL);
+ }
+ g_free(gconf_device_name);
}
- g_free(gconf_device_name);
-
gtk_list_store_clear (priv->list_store);
for (i = 0; i < num_devices; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]