1
0
Fork 0
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:
Felix Ableitner 2016-01-21 22:28:49 +01:00
parent 0ce4962265
commit d062f07820

View file

@ -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);