From fb29eb17b68a97b96818f5bd8597f4544894aff5 Mon Sep 17 00:00:00 2001 From: Rob Giseburt Date: Tue, 15 Oct 2019 21:41:27 -0500 Subject: [PATCH] Fix merge error: check coolant outputs before using --- g2core/coolant.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g2core/coolant.cpp b/g2core/coolant.cpp index 77fe4e5e..0c1c6dc4 100644 --- a/g2core/coolant.cpp +++ b/g2core/coolant.cpp @@ -181,7 +181,7 @@ stat_t co_set_coph(nvObj_t *nv) stat_t co_get_comp(nvObj_t *nv) { return(get_integer(nv, coolant.mist.polarity)); } stat_t co_set_comp(nvObj_t *nv) { stat_t ret = set_integer(nv, (uint8_t &)coolant.mist.polarity, 0, 1); - if (ret == STAT_OK) { + if (ret == STAT_OK && coolant.mist.output) { coolant.mist.output->setPolarity((ioPolarity) coolant.mist.polarity); } return ret; @@ -189,7 +189,7 @@ stat_t co_set_comp(nvObj_t *nv) { stat_t co_get_cofp(nvObj_t *nv) { return(get_integer(nv, coolant.flood.polarity)); } stat_t co_set_cofp(nvObj_t *nv) { stat_t ret = set_integer(nv, (uint8_t &)coolant.flood.polarity, 0, 1); - if (ret == STAT_OK) { + if (ret == STAT_OK && coolant.flood.output) { coolant.flood.output->setPolarity((ioPolarity) coolant.flood.polarity); } return ret;