fix bug : coredump when msg_queue is empty