threadcommunicator: fixed segmentation fault at deconstruction