Fixed a possible crash if config has not yet been initialized on startup.

This commit is contained in:
Felix Ableitner 2014-09-14 18:28:39 +03:00
parent ffefe46eed
commit 4e254984ca
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener {
*/ */
public List<Node> getNodes() { public List<Node> getNodes() {
if (mConfig == null) if (mConfig == null)
return null; return new ArrayList<>();
try { try {
return getNodes(mConfig.getJSONArray("Nodes")); return getNodes(mConfig.getJSONArray("Nodes"));