diff --git a/cas-server-3.4.2/cas-server-core/src/main/java/org/jasig/cas/services/web/ServiceThemeResolver.java b/cas-server-3.4.2/cas-server-core/src/main/java/org/jasig/cas/services/web/ServiceThemeResolver.java
index <HASH>..<HASH> 100644
--- a/cas-server-3.4.2/cas-server-core/src/main/java/org/jasig/cas/services/web/ServiceThemeResolver.java
+++ b/cas-server-3.4.2/cas-server-core/src/main/java/org/jasig/cas/services/web/ServiceThemeResolver.java
@@ -50,6 +50,10 @@ public final class ServiceThemeResolver extends AbstractThemeResolver {
         // retrieve the user agent string from the request
         String userAgent = request.getHeader("User-Agent");
 
+        if (userAgent == null) {
+            return getDefaultThemeName();
+        }
+
         for (final Map.Entry<Pattern,String> entry : this.overrides.entrySet()) {
             if (entry.getKey().matcher(userAgent).matches()) {
                 request.setAttribute("isMobile","true");
CAS-<I>

fixed potential null pointer exception in ServiceThemeResolver.  Thanks to Cyrus for reporting/patch.