diff --git a/include/Image.h b/include/Image.h index 6c87507d9c..1fba0dafe5 100644 --- a/include/Image.h +++ b/include/Image.h @@ -159,11 +159,14 @@ public: { int rc = 0; - if ((to_enable == true) && (state == DISABLED)) + if ( to_enable == true ) { - state = READY; + if(state == DISABLED) + { + state = READY; + } } - else if ((to_enable == false) && (state == READY)) + else if (state != USED) // to_enable == false { state = DISABLED; }