summaryrefslogtreecommitdiff
path: root/src/contacts-avatar-dialog.vala
diff options
context:
space:
mode:
authorChris Cummins <christopher.e.cummins@intel.com>2013-05-24 14:15:25 +0100
committerErick PĂ©rez Castellanos <erick.red@gmail.com>2013-05-27 09:28:59 -0400
commite558b874015220f9fa047958c0b2fb7ad2d960ce (patch)
tree5fb0ab5d28be35c0bbeb5543233cc197cbdf63c7 /src/contacts-avatar-dialog.vala
parent5bffc448b2c3592b74a849a611605608ae7b6d7a (diff)
downloadgnome-contacts-e558b874015220f9fa047958c0b2fb7ad2d960ce.tar.gz
Dispose of cheese widget on avatar dialog destroy
This ensures that the cheese widget is destroyed when the avatar dialog is closed. If the widget is not destroyed then the camera device remains in use, causing a blank preview to be shown if the dialog is reopened. https://bugzilla.gnome.org/show_bug.cgi?id=700959
Diffstat (limited to 'src/contacts-avatar-dialog.vala')
-rw-r--r--src/contacts-avatar-dialog.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/contacts-avatar-dialog.vala b/src/contacts-avatar-dialog.vala
index 1bd538c..927f4ea 100644
--- a/src/contacts-avatar-dialog.vala
+++ b/src/contacts-avatar-dialog.vala
@@ -448,6 +448,14 @@ public class Contacts.AvatarDialog : Dialog {
}
}
+#if HAVE_CHEESE
+ /* Ensure the Vala garbage collector disposes of the Cheese widget.
+ * This prevents the 'Device or resource busy' warnings, see:
+ * https://bugzilla.gnome.org/show_bug.cgi?id=700959
+ */
+ cheese = null;
+#endif
+
this.destroy ();
});