Skip to content
This repository
Browse code

Fix for AlarmClock(): Prevent freeze-up when time <=0 and loop = true

  • Loading branch information...
commit 7f23fca66ecdc20e809fad4d4cd4daeaa9bf722d 1 parent 4659e13
phil65-2 authored February 17, 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 7f23fca

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