Merge "Fixed a crash when rotating a WPS dialog." into lmp-dev