summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/ObjectFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'py/modules/IcePy/ObjectFactory.cpp')
-rw-r--r--py/modules/IcePy/ObjectFactory.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/py/modules/IcePy/ObjectFactory.cpp b/py/modules/IcePy/ObjectFactory.cpp
index 4af8965349a..336ca9dc902 100644
--- a/py/modules/IcePy/ObjectFactory.cpp
+++ b/py/modules/IcePy/ObjectFactory.cpp
@@ -49,7 +49,20 @@ IcePy::ObjectFactory::create(const string& id)
//
// Get the type information.
//
- ClassInfoPtr info = lookupClassInfo(id);
+ ClassInfoPtr info;
+ if(id == Ice::Object::ice_staticId())
+ {
+ //
+ // When the ID is that of Ice::Object, it indicates that the stream has not
+ // found a factory and is providing us an opportunity to preserve the object.
+ //
+ info = lookupClassInfo("::Ice::UnknownSlicedObject");
+ }
+ else
+ {
+ info = lookupClassInfo(id);
+ }
+
if(!info)
{
return 0;