diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-02-07 15:55:01 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-02-07 15:55:01 +0000 |
commit | 19d76c498864186d3d3e37a037eb05fa1bf1a75b (patch) | |
tree | 41dd2158953680e71d4350f2d8b5f55f857faaad /cpp | |
parent | Fixed icej version (diff) | |
download | ice-19d76c498864186d3d3e37a037eb05fa1bf1a75b.tar.bz2 ice-19d76c498864186d3d3e37a037eb05fa1bf1a75b.tar.xz ice-19d76c498864186d3d3e37a037eb05fa1bf1a75b.zip |
Fix potential NullHandleException
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/src/Ice/Service.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/cpp/src/Ice/Service.cpp b/cpp/src/Ice/Service.cpp index d4232d2aefe..80bd46c13ff 100755 --- a/cpp/src/Ice/Service.cpp +++ b/cpp/src/Ice/Service.cpp @@ -613,12 +613,15 @@ Ice::Service::run(int& argc, char* argv[], const InitializationData& initData) error("service caught unhandled C++ exception"); } - try - { - _communicator->destroy(); - } - catch(...) + if(_communicator) { + try + { + _communicator->destroy(); + } + catch(...) + { + } } return status; @@ -1840,12 +1843,15 @@ Ice::Service::runDaemon(int argc, char* argv[], const InitializationData& initDa close(fds[1]); } - try - { - _communicator->destroy(); - } - catch(...) + if(_communicator) { + try + { + _communicator->destroy(); + } + catch(...) + { + } } return status; |