Skip to content
  • Morten Johan Sørvig's avatar
    Cocoa: Fix crash on screen disconnect. · c4886ca4
    Morten Johan Sørvig authored
    
    
    Maintain virtual siblings list on screen deletion.
    
    QCocoaIntegration::updateScreens() has a loop which
    will delete all non-current QScreen objects using
    QPlatformIntegration::destroyScreen().
    
    destroyScreen() vill eventually call QWindowPrivate::
    setTopLevelScreen() which accesses the virtual siblings
    list for the deleted screen.
    
    This can cause a stale pointer access if the virtual
    screen list is not up to date, especially when disconnecting
    two screens at the same time.
    
    Change-Id: Ia6b9d01edf8e5eea25b64604a2b3b28b173125f7
    Task-number: QTBUG-48275
    Reviewed-by: default avatarTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>
    Reviewed-by: default avatarMorten Johan Sørvig <morten.sorvig@theqtcompany.com>
    c4886ca4