Fix bug when moving an unopened book in GUI
authorNiki Roo <niki@nikiroo.be>
Sun, 6 Aug 2017 13:45:05 +0000 (15:45 +0200)
committerNiki Roo <niki@nikiroo.be>
Sun, 6 Aug 2017 13:45:05 +0000 (15:45 +0200)
src/be/nikiroo/fanfix/reader/GuiReader.java

index 0faea6e031d9fb712ad6a04bc0a6cfb8adfa2dc9..2f1b33961329179253fa6049ccaded8f3d774f11 100644 (file)
@@ -226,7 +226,9 @@ class GuiReader extends BasicReader {
 
        void changeType(String luid, String newSource) {
                try {
-                       localLibrary.changeSource(luid, newSource, null);
+                       if (localLibrary.getInfo(luid) != null) {
+                               localLibrary.changeSource(luid, newSource, null);
+                       }
                        getLibrary().changeSource(luid, newSource, null);
                } catch (IOException e) {
                        Instance.syserr(e);