Return 0 for the direction if it is currently None.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 11:55:29 +0000 (13:55 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 11:55:29 +0000 (13:55 +0200)
tabakrolletjie/rays.py

index 621ded65a0e25f557a1d9f6db4f92ad9f62f7ac8..11bfd33fd259e42fc397bbe0e63b3862860150e1 100644 (file)
@@ -148,6 +148,8 @@ class RayPolyManager(object):
 
     @property
     def direction(self):
+        if self._direction is None:
+            return 0
         return self._direction.angle_degrees
 
     @direction.setter