add an upstream crash fix
authormirabilos <tg@debian.org>
Wed, 10 Feb 2021 19:17:17 +0000 (20:17 +0100)
committermirabilos <mirabilos@evolvis.org>
Wed, 10 Feb 2021 19:17:17 +0000 (20:17 +0100)
debian/changelog
debian/patches/backports/plugin-parent.diff [new file with mode: 0644]
debian/patches/series

index 40f8c3d..46ddb27 100644 (file)
@@ -1,3 +1,9 @@
+musescore3 (3.2.3+dfsg2-9~~test1) UNRELEASED; urgency=medium
+
+  * backports/plugin-parent.diff
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Wed, 10 Feb 2021 20:13:20 +0100
+
 musescore3 (3.2.3+dfsg2-8) unstable; urgency=medium
 
   * Sync SMuFL update to upstream
diff --git a/debian/patches/backports/plugin-parent.diff b/debian/patches/backports/plugin-parent.diff
new file mode 100644 (file)
index 0000000..f4a4325
--- /dev/null
@@ -0,0 +1,27 @@
+Origin: upstream, commit:f1369d3a5ae1beca7a01fd06719ffe93f39cfb47
+Author: Dmitri Ovodok <dmitrio95@yandex.ru>
+Description: Plugins: fix a crash on getting element's parent if parent is null
+
+--- a/mscore/plugin/api/elements.cpp
++++ b/mscore/plugin/api/elements.cpp
+@@ -123,6 +123,9 @@ void Chord::remove(Ms::PluginAPI::Elemen
+ Element* wrap(Ms::Element* e, Ownership own)
+       {
++      if (!e)
++            return nullptr;
++
+       using Ms::ElementType;
+       switch(e->type()) {
+             case ElementType::NOTE:
+--- a/mscore/plugin/api/scoreelement.cpp
++++ b/mscore/plugin/api/scoreelement.cpp
+@@ -105,6 +105,8 @@ void ScoreElement::set(Ms::Pid pid, QVar
+ ScoreElement* wrap(Ms::ScoreElement* se, Ownership own)
+       {
++      if (!se)
++            return nullptr;
+       if (se->isElement())
+             return wrap(toElement(se), own);
index 909baac..69fd2a7 100644 (file)
@@ -84,6 +84,7 @@ backports/plugin-size.diff
 backports/plugin-qml.diff
 backports/5507.patch
 backports/crash-F9.diff
+backports/plugin-parent.diff
 upstream/silence-qdebug.diff
 upstream/statusline-pitch-onofftime.diff
 upstream/improve-mscore-font.diff