on xenial help sign in
MenuItemFactory: protect from unset context
1de2290Marco Trevisan (Treviño)
qml/Panel/Indicators/MenuItemFactory.qml+1−1
@@ -1026,7 +1026,7 @@ Item {
1026 }
1026 }
1027
1027
1028 function load(modelData, context) {
1028 function load(modelData, context) {
1029− if (context.indexOf("fake-") == 0)
1029+ if (context && context.indexOf("fake-") == 0)
1030 context = context.substring("fake-".length)
1030 context = context.substring("fake-".length)
1031
1031
1032 if (modelData.action !== undefined && modelData.action !== "") {
1032 if (modelData.action !== undefined && modelData.action !== "") {