diff options
Diffstat (limited to 'python/modules/IcePy/Util.cpp')
-rw-r--r-- | python/modules/IcePy/Util.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/modules/IcePy/Util.cpp b/python/modules/IcePy/Util.cpp index 5fb091dcc74..289fab58f93 100644 --- a/python/modules/IcePy/Util.cpp +++ b/python/modules/IcePy/Util.cpp @@ -73,6 +73,11 @@ getVersion(PyObject* p, T& v, const char* type) } v.major = static_cast<Ice::Byte>(m); } + else + { + v.major = 0; + } + if(minor.get()) { major = PyNumber_Long(minor.get()); @@ -89,6 +94,10 @@ getVersion(PyObject* p, T& v, const char* type) } v.minor = static_cast<Ice::Byte>(m); } + else + { + v.minor = 0; + } return true; } |