From 47c6ec5efa0e5422c97e0b2b1b338d7247725d07 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 27 Nov 2009 03:21:21 +0000 Subject: [PATCH] (trunk libT) #2551: "when uploading to peers, prefetch local data from disk" -- fix peer-msgs.c NULL pointer dereference introduced in r9514 for this ticket. Reported by Waldorf --- libtransmission/peer-msgs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 87afdb217..bfb7a4fc6 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -1973,7 +1973,8 @@ fillOutputBuffer( tr_peermsgs * msgs, time_t now ) protocolSendReject( msgs, &req ); } - prefetchPieces( msgs ); + if( msgs != NULL ) + prefetchPieces( msgs ); } /**