mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Fixed crash if listener is null (fixes #482).
This commit is contained in:
parent
0ce4962265
commit
d062f07820
1 changed files with 5 additions and 2 deletions
|
@ -241,8 +241,11 @@ public class SyncthingService extends Service implements
|
|||
|
||||
if (mConfig != null) {
|
||||
mCurrentState = State.STARTING;
|
||||
registerOnWebGuiAvailableListener(mApi);
|
||||
registerOnWebGuiAvailableListener(mEventProcessor);
|
||||
|
||||
if (mApi != null)
|
||||
registerOnWebGuiAvailableListener(mApi);
|
||||
if (mEventProcessor != null)
|
||||
registerOnWebGuiAvailableListener(mEventProcessor);
|
||||
new PollWebGuiAvailableTaskImpl(getFilesDir() + "/" + HTTPS_CERT_FILE)
|
||||
.execute(mConfig.getWebGuiUrl());
|
||||
mRunnable = new SyncthingRunnable(this, SyncthingRunnable.Command.main);
|
||||
|
|
Loading…
Reference in a new issue