From 59712222da4b18ba64ba94dcead0e18a22282ddd Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 4 Oct 2012 21:26:32 +0000 Subject: [PATCH] added an test to avodi calling a null ftController in simulation mode git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5639 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/turtle/p3turtle.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/turtle/p3turtle.cc b/libretroshare/src/turtle/p3turtle.cc index c771f90ad..34145014a 100644 --- a/libretroshare/src/turtle/p3turtle.cc +++ b/libretroshare/src/turtle/p3turtle.cc @@ -480,8 +480,9 @@ void p3turtle::autoWash() // File hashes can only be removed by calling the 'stopMonitoringFileTunnels()' command. // All calls to _ft_controller are done off-mutex, to avoir cross-lock - for(uint32_t i=0;iremoveFileSource(peers_to_remove[i].first,peers_to_remove[i].second) ; + if(_ft_controller != NULL) + for(uint32_t i=0;iremoveFileSource(peers_to_remove[i].first,peers_to_remove[i].second) ; } @@ -2067,7 +2068,7 @@ void p3turtle::handleTunnelResult(RsTurtleTunnelOkItem *item) // notify the file transfer controller for the new file source. This should be done off-mutex // so we deported this code here. // - if(new_tunnel) + if(new_tunnel && _ft_controller != NULL) { _ft_controller->addFileSource(new_hash,new_vpid) ; _ft_controller->statusChange(_online_peers) ;