File: workspace-crash.diff

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 218,192 kB
  • sloc: cpp: 291,369; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 249; perl: 82; pascal: 79
file content (16 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Fix a crash on reading a workspace with non-existing preferences
Author: Dmitri Ovodok <dmitrio95@yandex.ru>
Origin: upstream, commit:b9bb0ceb8223866f5b60f4d821b5b3544ffa4788
Applied-Upstream: master, commit:6c0bef1

--- a/mscore/preferences.cpp
+++ b/mscore/preferences.cpp
@@ -219,7 +219,7 @@ QVariant Preferences::defaultValue(const
       {
       checkIfKeyExists(key);
       Preference* pref = _allPreferences.value(key);
-      return pref->defaultValue();
+      return pref ? pref->defaultValue() : QVariant();
       }
 
 QSettings* Preferences::settings() const