Fix crash with nil passes
Merge pull request #911 from Keithbsmiley/2.1

Fix crash with nil passes