Fixed a possible crash if config has not yet been initialized on startup.
This commit is contained in:
parent
ffefe46eed
commit
4e254984ca
|
@ -384,7 +384,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener {
|
|||
*/
|
||||
public List<Node> getNodes() {
|
||||
if (mConfig == null)
|
||||
return null;
|
||||
return new ArrayList<>();
|
||||
|
||||
try {
|
||||
return getNodes(mConfig.getJSONArray("Nodes"));
|
||||
|
|
Loading…
Reference in New Issue