]> source.dussan.org Git - vaadin-framework.git/commitdiff
Graceful servlet shutdown if no VaadinService is initialized (#10981)
authorIlia Motornyi <elmot@vaadin.com>
Mon, 18 Jun 2018 11:32:03 +0000 (13:32 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Jun 2018 11:32:03 +0000 (13:32 +0200)
Fixes #10980

server/src/main/java/com/vaadin/server/VaadinServlet.java

index ec4c425ff5fd9fcda5eb960a114556413fccf2f6..a32b1f50672f4b6d15cf7b1b528595ae624f7b73 100644 (file)
@@ -1436,7 +1436,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) {