FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add null check to event · pythonnet/pythonnet@cc0c620 · GitHub

Repository navigation

Commit cc0c620

Browse files
committed
Add null check to event
1 parent f82aeea commit cc0c620

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/runtime/ClassManager.cs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,12 @@ internal static bool ShouldBindProperty(PropertyInfo pi)
326326

327327
internal static bool ShouldBindEvent(EventInfo ei)
328328
{
329-
return ShouldBindMethod(ei.GetAddMethod(true));
329+
var mb = ei.GetAddMethod(true);
330+
if (mb == null)
331+
{
332+
return false;
333+
}
334+
return ShouldBindMethod(mb);
330335
}
331336

332337
private static ClassInfo GetClassInfo(Type type, ClassBase impl)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL