src/strip.vala
authorAlan Knowles <alan@roojs.com>
Fri, 15 Jun 2018 09:14:13 +0000 (17:14 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 15 Jun 2018 09:14:13 +0000 (17:14 +0800)
src/strip.vala

index 773a91b..4e65238 100644 (file)
@@ -371,7 +371,12 @@ public class Strip : GLib.Object {
        // initialize it with known data..
        // that should wipe out dupes.
        var filesize = this.execute("SELECT filesize FROM Attachment WHERE id = %d".printf(
-                       int.parse(sid)));       
+                       int.parse(sid)));  
+
+               if (filesize=="") {      
+                  GLib.debug("Ignoring record id (missing in database) :%s", sid);
+                  return;
+               }
                if (int.parse(filesize) < 1) {
                GLib.debug("Could not get filesize from id :%s = %s", sid,filesize);
                Posix.exit(0);