Fix for "NPE onSizeChanged" #41

A significant number of my users have crashed due to this issue. This should fix the NPE.