apply a forwards compatibility crash fix
authormirabilos <tg@debian.org>
Wed, 30 Oct 2019 13:17:07 +0000 (14:17 +0100)
committermirabilos <mirabilos@evolvis.org>
Wed, 30 Oct 2019 13:17:07 +0000 (14:17 +0100)
debian/changelog
debian/patches/series
debian/patches/upstream/workspace-crash.diff [new file with mode: 0644]

index 1996a7e..43a64b9 100644 (file)
@@ -1,3 +1,10 @@
+musescore (3.2.3+dfsg1-3) unstable; urgency=high
+
+  * Fix crash on reading preferences files containing unrecognised
+    entries (such as these from a later otherwise compatible version)
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Wed, 30 Oct 2019 14:16:11 +0100
+
 musescore (3.2.3+dfsg1-2) unstable; urgency=low
 
   * Upload to unstable, again without the restriking patch
index 4efa08d..a97caed 100644 (file)
@@ -8,6 +8,7 @@ upstream/untranslatable-error-msg.diff
 upstream/fix-cli-audio.diff
 upstream/fix-pluginless-build.diff
 upstream/undoable-spacer-drag-length.diff
+upstream/workspace-crash.diff
 experiments/statusline-concert-transposing-pitch.diff
 experiments/element-barbeat.diff
 #experiments/revert-restriking-patch.diff
diff --git a/debian/patches/upstream/workspace-crash.diff b/debian/patches/upstream/workspace-crash.diff
new file mode 100644 (file)
index 0000000..433c772
--- /dev/null
@@ -0,0 +1,16 @@
+Description: Fix a crash on reading a workspace with non-existing preferences
+Author: Dmitri Ovodok <dmitrio95@yandex.ru>
+Origin: vendor, commit:b9bb0ceb8223866f5b60f4d821b5b3544ffa4788
+Applied-Upstream: master, commit:6c0bef1
+
+--- a/mscore/preferences.cpp
++++ b/mscore/preferences.cpp
+@@ -226,7 +226,7 @@ QVariant Preferences::defaultValue(const
+       {
+       checkIfKeyExists(key);
+       Preference* pref = _allPreferences.value(key);
+-      return pref->defaultValue();
++      return pref ? pref->defaultValue() : QVariant();
+       }
+ QSettings* Preferences::settings() const