diff --git a/integration_tests/ctesque/src/test/java/android/content/res/ResourcesTest.java b/integration_tests/ctesque/src/test/java/android/content/res/ResourcesTest.java
index b3ce0e5..34f451f 100644
--- a/integration_tests/ctesque/src/test/java/android/content/res/ResourcesTest.java
+++ b/integration_tests/ctesque/src/test/java/android/content/res/ResourcesTest.java
@@ -575,6 +575,16 @@
   }
 
   @Test
+  public void testGetXml_notNPEAfterClose() {
+    XmlResourceParser parser = resources.getXml(R.xml.preferences);
+    parser.close();
+    // the following methods should not NPE if the XmlResourceParser has been closed.
+    assertThat(parser.getName()).isNull();
+    assertThat(parser.getNamespace()).isEmpty();
+    assertThat(parser.getText()).isNull();
+  }
+
+  @Test
   public void openRawResource_shouldLoadRawResources() throws Exception {
     InputStream resourceStream = resources.openRawResource(R.raw.raw_resource);
     assertThat(resourceStream).isNotNull();
diff --git a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowXmlBlock.java b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowXmlBlock.java
index 953813b..c2e1a4c 100644
--- a/shadows/framework/src/main/java/org/robolectric/shadows/ShadowXmlBlock.java
+++ b/shadows/framework/src/main/java/org/robolectric/shadows/ShadowXmlBlock.java
@@ -144,28 +144,37 @@
   @Implementation(minSdk = VERSION_CODES.LOLLIPOP)
   protected static int nativeGetNamespace(long state) {
     ResXMLParser resXMLParser = getResXMLParser(state);
+    if (resXMLParser == null) {
+      return -1;
+    }
     return resXMLParser.getElementNamespaceID();
   }
 
   @Implementation(maxSdk = VERSION_CODES.KITKAT_WATCH)
   protected static int nativeGetName(int state) {
-    return (int)nativeGetName((long)state);
+    return nativeGetName((long) state);
   }
 
   @Implementation(minSdk = VERSION_CODES.LOLLIPOP)
   protected static int nativeGetName(long state) {
     ResXMLParser resXMLParser = getResXMLParser(state);
+    if (resXMLParser == null) {
+      return -1;
+    }
     return resXMLParser.getElementNameID();
   }
 
   @Implementation(maxSdk = VERSION_CODES.KITKAT_WATCH)
   protected static int nativeGetText(int state) {
-    return (int)nativeGetText((long)state);
+    return nativeGetText((long) state);
   }
 
   @Implementation(minSdk = VERSION_CODES.LOLLIPOP)
   protected static int nativeGetText(long state) {
     ResXMLParser resXMLParser = getResXMLParser(state);
+    if (resXMLParser == null) {
+      return -1;
+    }
     return resXMLParser.getTextID();
   }
 
@@ -346,6 +355,6 @@
   }
 
   private static ResXMLParser getResXMLParser(long state) {
-    return Registries.NATIVE_RES_XML_PARSERS.getNativeObject(state);
+    return Registries.NATIVE_RES_XML_PARSERS.peekNativeObject(state);
   }
 }
