Checks view

Checks if view != null before getting button source.
Merge pull request #30 from Deam/dev-checknull

Checks view