Fix for a potential bug caught by Coverity. Pointed out to me by Kris Kennaway.
Fix for a potential bug caught by Coverity. Pointed out to me by Kris Kennaway.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase