diff options
| author | Gavin Andresen <[email protected]> | 2013-10-15 15:30:20 +1000 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-15 15:30:20 +1000 |
| commit | b2ba55c42b563418e7be4adb38cdbf1852e6c78d (patch) | |
| tree | eb0f59892727ebf000d03cf5f084d8c585211108 /src/bitcoinrpc.cpp | |
| parent | Merge pull request #3077 from sipa/chain (diff) | |
| download | discoin-b2ba55c42b563418e7be4adb38cdbf1852e6c78d.tar.xz discoin-b2ba55c42b563418e7be4adb38cdbf1852e6c78d.zip | |
Avoid core dump if rpc port is in use.
The cleanup code needs to check for NULL rpcworkers thread group.
Diffstat (limited to 'src/bitcoinrpc.cpp')
| -rw-r--r-- | src/bitcoinrpc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index b0df9c5e2..ae988a760 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -881,7 +881,8 @@ void StopRPCThreads() deadlineTimers.clear(); rpc_io_service->stop(); - rpc_worker_group->join_all(); + if (rpc_worker_group != NULL) + rpc_worker_group->join_all(); delete rpc_worker_group; rpc_worker_group = NULL; delete rpc_ssl_context; rpc_ssl_context = NULL; delete rpc_io_service; rpc_io_service = NULL; |