Cancel when saving attachments causes soft assertion
File.new_for_path() was being passed null.
This commit is contained in:
parent
3efdc5b6eb
commit
34c6ca6ff4
1 changed files with 4 additions and 2 deletions
|
|
@ -1532,13 +1532,15 @@ public class GearyController : Geary.BaseObject {
|
|||
dialog.set_local_only(false);
|
||||
|
||||
bool accepted = (dialog.run() == Gtk.ResponseType.ACCEPT);
|
||||
File destination = File.new_for_path(dialog.get_filename());
|
||||
string? filename = dialog.get_filename();
|
||||
|
||||
dialog.destroy();
|
||||
|
||||
if (!accepted)
|
||||
if (!accepted || Geary.String.is_empty(filename))
|
||||
return;
|
||||
|
||||
File destination = File.new_for_path(filename);
|
||||
|
||||
// Proceeding, save this as last destination directory
|
||||
last_save_directory = (attachments.size == 1) ? destination.get_parent() : destination;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue