summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-02-13 04:37:41 +0000
committerDana Jansens <danakj@orodu.net>2003-02-13 04:37:41 +0000
commit8ad1d0bb99ec03c0a233df74aff986c4d49a762b (patch)
treefd4e539daeae0de2a7ffc102601ad8fa97bd7ac1
parent7c32ac2b3f0bfd02a1efea1d67e5ad1c3c5be93f (diff)
clear the stringlist before populating it
-rw-r--r--src/python.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/python.cc b/src/python.cc
index 10bcbdb7..64398e38 100644
--- a/src/python.cc
+++ b/src/python.cc
@@ -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))