fix NPE
This commit is contained in:
parent
2677f3cca7
commit
aa97583daa
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ public class CommandSetProfile extends Command {
|
|||
|
||||
// Send SMS notification if ProfileSwitch is comming from NS
|
||||
ProfileSwitch profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(System.currentTimeMillis());
|
||||
if (r.enacted && profileSwitch.source == Source.NIGHTSCOUT) {
|
||||
if (profileSwitch != null && r.enacted && profileSwitch.source == Source.NIGHTSCOUT) {
|
||||
SmsCommunicatorPlugin smsCommunicatorPlugin = MainApp.getSpecificPlugin(SmsCommunicatorPlugin.class);
|
||||
if (smsCommunicatorPlugin != null && smsCommunicatorPlugin.isEnabled(PluginType.GENERAL)) {
|
||||
smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.gs(R.string.profile_set_ok));
|
||||
|
|
Loading…
Reference in a new issue