From 2f48d35cc90e110e9cbc904fe2b83e45730b7782 Mon Sep 17 00:00:00 2001 From: Hellfish Date: Sun, 6 Nov 2011 12:10:10 +0000 Subject: [PATCH] *Fixed LQ Set Pictures download --- src/main/java/forge/GuiDownloadSetPicturesLQ.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/forge/GuiDownloadSetPicturesLQ.java b/src/main/java/forge/GuiDownloadSetPicturesLQ.java index 116a2968360..125421723bb 100644 --- a/src/main/java/forge/GuiDownloadSetPicturesLQ.java +++ b/src/main/java/forge/GuiDownloadSetPicturesLQ.java @@ -36,7 +36,7 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader { */ public GuiDownloadSetPicturesLQ(final JFrame frame) { super(frame); - picturesPath = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath(); + } protected final void addCardToList(ArrayList cList, CardPrinted c, String cardName) @@ -50,6 +50,10 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader { String imgFN = CardUtil.buildFilename(c, cardName); boolean foundSetImage = imgFN.contains(setCode3) || imgFN.contains(setCode2); + if(picturesPath == null) + { + System.out.println("Oh snap!"); + } if (!foundSetImage) { int artsCnt = c.getCard().getSetInfo(setCode3).getCopiesCount(); String fn = CardUtil.buildIdealFilename(cardName, c.getArtIndex(), artsCnt); @@ -67,6 +71,10 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader { * @return an array of {@link forge.GuiDownloader.DownloadObject} objects. */ protected final DownloadObject[] getNeededImages() { + if(picturesPath == null) + { + picturesPath = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath(); + } // read token names and urls DownloadObject[] cardTokenLQ = readFileWithNames(NewConstants.TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN)); ArrayList cList = new ArrayList();