bugfix: linput_t was accessing uninitialized variable in some cases

This commit is contained in:
elias.bachaalany 2010-02-16 15:21:49 +00:00
parent 8b7625f145
commit 42a2f7f630

View File

@ -98,20 +98,11 @@ public:
// class from and to IDC. The value of this variable must be set to two // class from and to IDC. The value of this variable must be set to two
int __idc_cvt_id__; int __idc_cvt_id__;
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
loader_input_t(PyObject *pycobject = NULL) loader_input_t(PyObject *pycobject = NULL): li(NULL), own(OWN_NONE), __idc_cvt_id__(2)
{ {
__idc_cvt_id__ = 2; // Opaque object
if (pycobject != NULL && PyCObject_Check(pycobject)) if (pycobject != NULL && PyCObject_Check(pycobject))
{
_from_cobject(pycobject); _from_cobject(pycobject);
} }
else
{
li = NULL;
own = OWN_NONE;
fn.qclear();
}
}
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
void close() void close()
@ -123,7 +114,7 @@ public:
close_linput(li); close_linput(li);
else if (own == OWN_FROM_FP) else if (own == OWN_FROM_FP)
unmake_linput(li); unmake_linput(li);
own = OWN_NONE;
li = NULL; li = NULL;
} }