Index: /trunk/core/action_stack.c
===================================================================
--- /trunk/core/action_stack.c	(revision 1646)
+++ /trunk/core/action_stack.c	(revision 1647)
@@ -52,5 +52,10 @@
     
     action_stack_t* stack = tmp[num_stacks];
-    stack->action_process = proc_func;
+    if(proc_func) {
+        stack->action_process = proc_func;
+    } else {
+        stack->action_process = action_stack_standard;
+    }
+
     stack->stack_ptr = 0;
     stack->comp_id = task_comp_id;
@@ -184,7 +189,10 @@
     {
         /* setup timer */
-        long action = action_get_prev(p);
-        /* delay of -1 signals indefinite (actually 1 day) delay*/ 
-        action_stacks[active_stack]->delay_target_ticks = t+((action == -1)?86400000:action);
+        long delay = action_get_prev(p);
+        /* delay of -1 signals indefinite (actually 1 day) delay*/
+        if(delay == -1) {
+            delay = 86400000;
+        }
+        action_stacks[active_stack]->delay_target_ticks = t+delay;
         return 0;
     }
@@ -204,7 +212,5 @@
 // Can only be called from an action stack
 int action_stack_standard(long p)
-{        
-    long t;
-    
+{
     switch (p)
     {
@@ -275,9 +281,5 @@
     if (stack->stack_ptr > -1)
     {
-        long stack_arg = action_get_prev(1);
-        if (stack->action_process)
-            stack->action_process(stack_arg);
-        else
-            action_stack_standard(stack_arg);
+        stack->action_process(action_get_prev(1));
     }
     else
@@ -289,11 +291,9 @@
 void action_stack_process_all()
 {
-    int i;
-    for (i = num_stacks - 1; i >= 0; --i)
-    {
-        active_stack = i;
-        action_stack_process(i);
-    }
-    
+    for (active_stack = num_stacks - 1; active_stack >= 0; --active_stack)
+    {
+        action_stack_process(active_stack);
+    }
+
     active_stack = -1;
 }
