diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-15 15:30:20 +1000 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-15 15:30:20 +1000 |
commit | b2ba55c42b563418e7be4adb38cdbf1852e6c78d (patch) | |
tree | eb0f59892727ebf000d03cf5f084d8c585211108 | |
parent | b9beea6e9d0f789f11d249b040e549d535bdc295 (diff) |
Avoid core dump if rpc port is in use.
The cleanup code needs to check for NULL rpcworkers thread group.
-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 b0df9c5e28..ae988a7608 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; |