Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 7ac412e

Browse files
committed
properties: Defensive measures
1 parent 580c4a7 commit 7ac412e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/ExportObject.cs

+12-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public MethodCaller GetPropertyAllCall (string iface)
7070

7171
if (null == calls.All) {
7272
Type it = Mapper.GetInterfaceType (ObjectType, iface);
73-
calls.All = TypeImplementer.GenGetAllCall (it);
73+
calls.All = null == it ? null : TypeImplementer.GenGetAllCall (it);
7474
}
7575

7676
return calls.All;
@@ -258,7 +258,17 @@ private void HandlePropertyCall (MessageContainer method_call)
258258
if ("GetAll" == method_call.Member) {
259259
Signature asv = Signature.MakeDict (Signature.StringSig, Signature.VariantSig);
260260

261-
MethodCaller call = typeMembers [Object.GetType ()].GetPropertyAllCall (face);
261+
MethodCaller call = null;
262+
263+
try {
264+
call = typeMembers [Object.GetType ()].GetPropertyAllCall (face);
265+
}
266+
catch { }
267+
268+
if (null == call) {
269+
conn.MaybeSendUnknownMethodError (method_call);
270+
return;
271+
}
262272

263273
Exception ex = null;
264274
try {

0 commit comments

Comments
 (0)