diff --git a/src/ui.vala b/src/ui.vala
index 941f7bb..09d15c9 100644
--- a/src/ui.vala
+++ b/src/ui.vala
@@ -1470,7 +1470,6 @@ public class UserInterface : Gtk.ApplicationWindow
 
     private void email_document ()
     {
-        var saved = false;
         var command_line = "xdg-email";
 
         /* Save text files as PDFs */
@@ -1501,10 +1500,7 @@ public class UserInterface : Gtk.ApplicationWindow
             {
                 var path = get_temporary_filename ("scan", "jpg");
                 if (path == null)
-                {
-                    saved = false;
                     break;
-                }
 
                 var file = File.new_for_path (path);
                 try
@@ -1517,9 +1513,6 @@ public class UserInterface : Gtk.ApplicationWindow
                     return;
                 }
                 command_line += " --attach %s".printf (path);
-
-                if (!saved)
-                    break;
             }
         }
