Merge "Fix exception when assert is called before a step"
diff --git a/TestON/core/utilities.py b/TestON/core/utilities.py
index 8822aab..d5a5c0f 100644
--- a/TestON/core/utilities.py
+++ b/TestON/core/utilities.py
@@ -185,11 +185,14 @@
                 print e
 
         main.last_result = result
-        main.stepResults[2][-1] = result
-        try:
-            main.stepResults[3][-1] = arguments[ 'ONFAIL' ]
-        except AttributeError:
-            pass
+        if main.stepResults[2]:
+            main.stepResults[2][-1] = result
+            try:
+                main.stepResults[3][-1] = arguments[ 'ONFAIL' ]
+            except AttributeError:
+                pass
+        else:
+            main.log.warn( "Assertion called before a test step" )
         return result
 
     def parse_args(self,args, **kwargs):