clear the stringlist before populating it

This commit is contained in:
Dana Jansens 2003-02-13 04:37:41 +00:00
parent 7c32ac2b3f
commit 8ad1d0bb99

View file

@ -74,6 +74,8 @@ bool python_get_stringlist(const char *name, std::vector<otk::ustring> *value)
PyObject *val = PyDict_GetItemString(obdict, const_cast<char*>(name));
if (!(val && PyList_Check(val))) return false;
value->clear();
for (int i = 0, end = PyList_Size(val); i < end; ++i) {
PyObject *str = PyList_GetItem(val, i);
if (PyString_Check(str))