diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index c418893a8..8769601c2 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c | |||
@@ -1618,7 +1618,8 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch, | |||
1618 | return; | 1618 | return; |
1619 | } | 1619 | } |
1620 | ccc = (NULL != ch->owner) ? ch->owner : ch->dest; | 1620 | ccc = (NULL != ch->owner) ? ch->owner : ch->dest; |
1621 | if (NULL != ccc->head_recv) | 1621 | if ( (NULL != ccc) && |
1622 | (NULL != ccc->head_recv) ) | ||
1622 | { | 1623 | { |
1623 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1624 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1624 | "Lost end of transmission due to remote shutdown on %s\n", | 1625 | "Lost end of transmission due to remote shutdown on %s\n", |
@@ -1626,9 +1627,10 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch, | |||
1626 | /* FIXME: change API to notify client about truncated transmission! */ | 1627 | /* FIXME: change API to notify client about truncated transmission! */ |
1627 | } | 1628 | } |
1628 | ch->destroy = GNUNET_YES; | 1629 | ch->destroy = GNUNET_YES; |
1629 | GSC_handle_remote_channel_destroy (ccc->c, | 1630 | if (NULL != ccc) |
1630 | ccc->ccn, | 1631 | GSC_handle_remote_channel_destroy (ccc->c, |
1631 | ch); | 1632 | ccc->ccn, |
1633 | ch); | ||
1632 | channel_destroy (ch); | 1634 | channel_destroy (ch); |
1633 | } | 1635 | } |
1634 | 1636 | ||