From 43ebdf9e94e05c679254ffc509aa9436838899dc Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Wed, 24 Apr 2019 18:03:53 +0400 Subject: [PATCH] Fixed NPE error on new systems; --- .../src/main/java/mage/client/dialog/WhatsNewDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/dialog/WhatsNewDialog.java b/Mage.Client/src/main/java/mage/client/dialog/WhatsNewDialog.java index 7808406b25..761024b843 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/WhatsNewDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/WhatsNewDialog.java @@ -200,8 +200,10 @@ public class WhatsNewDialog extends MageDialog { }.getType(); try { httpCookies = gson.fromJson(sourceValue, type); - for (HttpCookie cookie : httpCookies) { - store.add(URI.create(cookie.getDomain()), cookie); + if (httpCookies != null) { + for (HttpCookie cookie : httpCookies) { + store.add(URI.create(cookie.getDomain()), cookie); + } } } catch (Exception e) { logger.error("Wrong news page cookies", e);