diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-24 14:26:56 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-24 14:26:56 +0000 |
commit | 389e0afa4cabf4c9ed980ef7021beca067a53498 (patch) | |
tree | 2b741fbd6d38a7ba1b7a7d07418b2add4168509c | |
parent | 6e03d509075d2cd38fabab6568b4c2bf2451505e (diff) | |
download | gnunet-389e0afa4cabf4c9ed980ef7021beca067a53498.tar.gz gnunet-389e0afa4cabf4c9ed980ef7021beca067a53498.zip |
- Don't crash, _break instead
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 3d4f18678..3b526afeb 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -2696,6 +2696,11 @@ GMC_is_sendable (struct MeshConnection *c, int fwd) | |||
2696 | { | 2696 | { |
2697 | struct MeshFlowControl *fc; | 2697 | struct MeshFlowControl *fc; |
2698 | 2698 | ||
2699 | if (NULL == c) | ||
2700 | { | ||
2701 | GNUNET_break (0); | ||
2702 | return GNUNET_YES; | ||
2703 | } | ||
2699 | fc = fwd ? &c->fwd_fc : &c->bck_fc; | 2704 | fc = fwd ? &c->fwd_fc : &c->bck_fc; |
2700 | if (GM_is_pid_bigger (fc->last_ack_recv, fc->last_pid_sent)) | 2705 | if (GM_is_pid_bigger (fc->last_ack_recv, fc->last_pid_sent)) |
2701 | return GNUNET_YES; | 2706 | return GNUNET_YES; |