Fix DumpWindowHierarchy NullPointerException