--- a/DCC.pm
+++ b/DCC.pm
@@ -145,7 +145,7 @@
     # Only do the Disconnection Dance of Death if the socket is still
     # live. Duplicate dcc_close events would be a Bad Thing.
     
-    if ($self->{_socket}->opened) {
+    if ($self->{_socket}->opened and $self->{_parent}->can('handler')) {
 	$self->{_parent}->handler(Net::IRC::Event->new('dcc_close',
 						       $self->{_nick},
 						       $self->{_socket},
