Set stage icon for monitor depending on output device state, prevent crash when accessing back-end from unloaded component

This commit is contained in:
ChrisTerBeke 2017-12-07 10:38:06 +01:00
parent dd92d8d5e0
commit f91a4db617
3 changed files with 38 additions and 41 deletions

View file

@ -46,7 +46,7 @@ Item {
}
function sliceOrStopSlicing() {
if ([1, 5].indexOf(UM.Backend.state) != -1) {
if (backend != "undefined" && [1, 5].indexOf(UM.Backend.state) != -1) {
backend.forceSlice();
} else {
backend.stopSlicing();