Fix segfault in a client when controller disappears.