Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2247 from phil65/alarmclock-fix

Fix for AlarmClock(): Prevent freeze-up when time <=0 and loop = true
  • Loading branch information...
commit 8604fde73e563f023decfdf517d7e6bf8d1b9711 2 parents fd751b8 + 7f23fca
jmarshallnz jmarshallnz authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 xbmc/interfaces/Builtins.cpp
4 xbmc/interfaces/Builtins.cpp
View
@@ -983,7 +983,9 @@ int CBuiltins::Execute(const CStdString& execString)
if( g_alarmClock.IsRunning() )
g_alarmClock.Stop(params[0],silent);
-
+ // no negative times not allowed, loop must have a positive time
+ if (seconds < 0 || (seconds == 0 && loop))
+ return false;
g_alarmClock.Start(params[0], seconds, params[1], silent, loop);
}
else if (execute.Equals("notification"))
Please sign in to comment.
Something went wrong with that request. Please try again.