This fix crash when turn off and on the only primary display. BUG: 438839 BUG: 444801 (cherry picked from commit d39592c3)