diff --git a/src/main/java/net/fortuna/ical4j/util/ResourceLoader.java b/src/main/java/net/fortuna/ical4j/util/ResourceLoader.java
index <HASH>..<HASH> 100644
--- a/src/main/java/net/fortuna/ical4j/util/ResourceLoader.java
+++ b/src/main/java/net/fortuna/ical4j/util/ResourceLoader.java
@@ -54,7 +54,9 @@ public class ResourceLoader {
     public static URL getResource(String name) {
         URL resource = null;
         try {
-            resource = Thread.currentThread().getContextClassLoader().getResource(name);
+            if (Thread.currentThread().getContextClassLoader() != null) {
+                resource = Thread.currentThread().getContextClassLoader().getResource(name);
+            }
         } catch (SecurityException e) {
             LOG.info("Unable to access context classloader, using default. " + e.getMessage());
         }
Added null checking to avoid potential null pointer exception on some samsung devices