Skip to content

Commit

Permalink
NPE fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Dec 22, 2014
1 parent 5d321d3 commit bef689d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion htroot/ConfigPortal.java
Expand Up @@ -219,7 +219,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("target_selected_special_searchresult", "searchresult".equals(target_special) ? 1 : 0);
prop.put("target_special_pattern", sb.getConfig(SwitchboardConstants.SEARCH_TARGET_SPECIAL_PATTERN, ""));

String myaddress = (sb.peers == null) ? null : sb.peers.mySeed() == null ? null : sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP());
String myaddress = (sb.peers == null) || sb.peers.mySeed() == null || sb.peers.mySeed().getIP() == null ? null : sb.peers.mySeed().getPublicAddress(sb.peers.mySeed().getIP());
if (myaddress == null) {
myaddress = "localhost:" + sb.getLocalPort("port", 8090);
}
Expand Down
1 change: 1 addition & 0 deletions htroot/ViewLog_p.java
Expand Up @@ -102,6 +102,7 @@ public static serverObjects respond(@SuppressWarnings("unused") final RequestHea
int level = 0;
int lc = 0;
for (final String logLine : log) {
if (logLine == null) break;
final String nextLogLine = logLine.trim();

if (filterMatcher != null) {
Expand Down

0 comments on commit bef689d

Please sign in to comment.