Fix crash on launch in the window code.
Merge pull request #1 from mscoder610/master

Fix for crash on launch of Perception