Fix crash when changing composer From address

Fixes #538
This commit is contained in:
Michael Gratton 2019-08-17 15:55:35 +10:00
parent 779c3e0ac6
commit a52ff36454

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);