Skip to content
This repository
Browse code

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 authored February 16, 2013

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  xbmc/interfaces/Builtins.cpp
4  xbmc/interfaces/Builtins.cpp
@@ -983,7 +983,9 @@ int CBuiltins::Execute(const CStdString& execString)
983 983
 
984 984
     if( g_alarmClock.IsRunning() )
985 985
       g_alarmClock.Stop(params[0],silent);
986  
-
  986
+    // no negative times not allowed, loop must have a positive time
  987
+    if (seconds < 0 || (seconds == 0 && loop))
  988
+      return false;
987 989
     g_alarmClock.Start(params[0], seconds, params[1], silent, loop);
988 990
   }
989 991
   else if (execute.Equals("notification"))

0 notes on commit 8604fde

Please sign in to comment.
Something went wrong with that request. Please try again.