From 41bc74b05771cb0f49fb0b0e471b37b897179d17 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 24 Apr 2013 02:42:28 +0000 Subject: [PATCH] Add error check after creating an instance of the tag handler git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etg/htmlwinpars.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etg/htmlwinpars.py b/etg/htmlwinpars.py index b31da414..46a4b5ad 100644 --- a/etg/htmlwinpars.py +++ b/etg/htmlwinpars.py @@ -82,6 +82,12 @@ def run(): PyObject* arg = PyTuple_New(0); PyObject* obj = PyObject_CallObject(m_tagHandlerClass, arg); Py_DECREF(arg); + + // Make sure it succeeded + if (!obj) { + PyErr_Print(); + return; + } // now figure out where it's C++ object is... if (! wxPyConvertWrappedPtr(obj, (void **)&thPtr, wxT("wxHtmlWinTagHandler"))) {