Reorganize menus: View is split to Image, Thumbnails and Windows
Fix trivial null-pointer dereference