interactive: Fix segfault in case canvas is closed after CTRL-C