Merge "Fix NPE when multi-window not supported" into tm-dev