From e558b874015220f9fa047958c0b2fb7ad2d960ce Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Fri, 24 May 2013 14:15:25 +0100 Subject: 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 --- src/contacts-avatar-dialog.vala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/contacts-avatar-dialog.vala') 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 (); }); -- cgit v1.2.1