This fixes segmentation fault if service was quit without stopping it.
It has happened if Beremiz service was quit using taskbar icon or by
closing Beremiz IDE (in case of autostarted local service).
In second case to trigger the bug following step has to be done:
1. Open Beremiz IDE
2. Open project, compile and connect to LOCAL:// runtime
3. Transfer and start the PLC program
4. Open other project without disconneting the PLC runtime
5. Close Beremiz IDE