Prevent making calls on disposed widget.

As documented in issue #375, at very rare moments calls could be made
when the command line widget was disposed, triggering a RuntimeException
as a result.