diff options
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r-- | py/modules/IcePy/Communicator.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index e6e5fe50c55..335a9983d12 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -161,11 +161,18 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) { data.threadHook = new ThreadNotificationWrapper(threadHook.get()); } + } + try + { + data.properties = Ice::createProperties(seq, data.properties); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return -1; } - data.properties = Ice::createProperties(seq, data.properties); - // // Disable collocation optimization, otherwise a Python invocation on // a collocated servant results in a CollocationOptimizationException @@ -200,7 +207,7 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) } catch(const Ice::Exception& ex) { - for(i = 0; i < argc + 1; ++i) + for(i = 0; i < argc; ++i) { free(argv[i]); } @@ -224,7 +231,7 @@ communicatorInit(CommunicatorObject* self, PyObject* args, PyObject* /*kwds*/) } } - for(i = 0; i < argc + 1; ++i) + for(i = 0; i < argc; ++i) { free(argv[i]); } |