diff --git a/fsl/data/mesh.py b/fsl/data/mesh.py
index a96864d9afe61a023aa6eac70da070dcfd7d3036..de4a56e63f89bc70eaa797d2a2d426063fb65391 100644
--- a/fsl/data/mesh.py
+++ b/fsl/data/mesh.py
@@ -291,7 +291,7 @@ class TriangleMesh(object):
             return_locations=True,
             multiple_hits=False)
 
-        if tris.size == 0:
+        if len(tris) == 0:
             return np.zeros((0, 3)), np.zeros((0,))
 
         # sort by ray. I'm Not sure if this is