Unverified Commit 8b637d7c authored by K900's avatar K900 Committed by GitHub
Browse files

[staging-next] qt6.qtdeclarative: backport another common Plasma crash fix (#479804)

parents 95416609 45380955
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1583,10 +1583,9 @@
                     o->deleteLater();
             } else {
                 // If the object is C++-owned, we still have to release the weak reference we have
-                // to it.
-                ddata->jsWrapper.clear();
-                if (lastCall && ddata->propertyCache)
-                    ddata->propertyCache.reset();
+                // to it. If the "main" wrapper is not ours, we should leave it alone, though.
+                if (ddata->jsWrapper.as<QObjectWrapper>() == this)
+                    ddata->jsWrapper.clear();
             }
         }
     }
+5 −0
Original line number Diff line number Diff line
@@ -44,6 +44,11 @@ qtModule {
      hash = "sha256-KMFurA9Q84qwuyBraU3ZdoFWs8uO3uoUcinfcfh/ps8=";
    })

    # Backport of https://codereview.qt-project.org/c/qt/qtdeclarative/+/704031
    # Fixes common Plasma crash
    # FIXME: remove in 6.10.3
    ./another-crash-fix.patch

    # https://qt-project.atlassian.net/browse/QTBUG-137440
    (fetchpatch {
      name = "rb-dialogs-link-labsfolderlistmodel-into-quickdialogs2quickimpl.patch";