Skip to content

Commit a4f0881

Browse files
committed
Fix NPE #37
1 parent 0e8e5b4 commit a4f0881

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/org/netbeans/modules/php/wordpress/wpapis/WordPressVersionCheckApi.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ public void parse() throws IOException {
8888
InputStream inputStream = openStream();
8989
try {
9090
JSONObject jsonObject = (JSONObject) JSONValue.parse(new InputStreamReader(inputStream, Charset.UTF8));
91+
if (jsonObject == null) {
92+
LOGGER.log(Level.INFO, "Can't get json for version check information."); // NOI18N
93+
return;
94+
}
9195
JSONArray offers = (JSONArray) jsonObject.get("offers"); // NOI18N
9296

9397
// get version and locale

0 commit comments

Comments
 (0)