Fix #37092 and #37381: crashes in the .object() method of Freestyle iterators.
Now the method checks if the iterator is at the end, and returns None if that is the case.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@61233 954f8c5b-7b00-dc11-b283-0030488c597c