Fixes a potential NPE in View.

Calling getLocationOnScreen() before the View is attached to a window can
throw an NPE. This change simply guards against the exception.
1 file changed