From 7bf44065a4a2765e077453094dc06cc1e3c7684a Mon Sep 17 00:00:00 2001 From: Ilia Motornyi Date: Mon, 18 Jun 2018 13:32:03 +0200 Subject: Graceful servlet shutdown if no VaadinService is initialized (#10981) Fixes #10980 --- server/src/main/java/com/vaadin/server/VaadinServlet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/vaadin/server/VaadinServlet.java b/server/src/main/java/com/vaadin/server/VaadinServlet.java index 06a3325f9e..73564bc8de 100644 --- a/server/src/main/java/com/vaadin/server/VaadinServlet.java +++ b/server/src/main/java/com/vaadin/server/VaadinServlet.java @@ -1432,7 +1432,9 @@ public class VaadinServlet extends HttpServlet implements Constants { @Override public void destroy() { super.destroy(); - getService().destroy(); + if (getService() != null) { + getService().destroy(); + } } private static void persistCacheEntry(ScssCacheEntry cacheEntry) { -- cgit v1.2.3