Merge branch 'wip/538-crash-changing-from' into 'mainline'

Fix crash when changing composer From address

Closes #538

See merge request GNOME/geary!285
This commit is contained in:
Michael Gratton 2019-08-17 06:15:36 +00:00
commit 3a2a8c0c7c

View file

@ -1398,7 +1398,11 @@ public class ComposerWidget : Gtk.EventBox, Geary.BaseInterface {
}
GLib.Cancellable internal_cancellable = new GLib.Cancellable();
cancellable.cancelled.connect(() => { internal_cancellable.cancel(); });
if (cancellable != null) {
cancellable.cancelled.connect(
() => { internal_cancellable.cancel(); }
);
}
this.draft_manager_opening = internal_cancellable;
Geary.App.DraftManager new_manager = new Geary.App.DraftManager(account);