From: Niki Roo Date: Sun, 6 Aug 2017 13:45:05 +0000 (+0200) Subject: Fix bug when moving an unopened book in GUI X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=34eb62fc14c1f4db29e65ceb6b190811380aba7e;p=fanfix-jexer.git Fix bug when moving an unopened book in GUI --- diff --git a/src/be/nikiroo/fanfix/reader/GuiReader.java b/src/be/nikiroo/fanfix/reader/GuiReader.java index 0faea6e..2f1b339 100644 --- a/src/be/nikiroo/fanfix/reader/GuiReader.java +++ b/src/be/nikiroo/fanfix/reader/GuiReader.java @@ -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);