[HtmlUnit] SVN: [14344] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/dom/Document.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [14344] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/dom/Document.java

asashour-2
Revision: 14344
          http://sourceforge.net/p/htmlunit/code/14344
Author:   asashour
Date:     2017-05-04 08:22:50 +0000 (Thu, 04 May 2017)
Log Message:
-----------
Fix NPE

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java 2017-05-04 07:44:01 UTC (rev 14343)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java 2017-05-04 08:22:50 UTC (rev 14344)
@@ -1304,7 +1304,7 @@
      */
     @JsxGetter({CHROME, IE})
     public String getDomain() {
-        if (domain_ == null) {
+        if (domain_ == null && getPage().getWebResponse() != null) {
             URL url = getPage().getUrl();
             if (url == WebClient.URL_ABOUT_BLANK) {
                 final WebWindow w = getWindow().getWebWindow();


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop