]> Dogcows Code - chaz/openbox/commitdiff
clear the stringlist before populating it
authorDana Jansens <danakj@orodu.net>
Thu, 13 Feb 2003 04:37:41 +0000 (04:37 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 13 Feb 2003 04:37:41 +0000 (04:37 +0000)
src/python.cc

index 10bcbdb7b34c0aae9b838da81f9f208a52603f3f..64398e38be5c7298029c568b4133e63e8bc6f91c 100644 (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))
This page took 0.021433 seconds and 4 git commands to generate.