]> Dogcows Code - chaz/openbox/blobdiff - src/python.cc
clear the stringlist before populating it
[chaz/openbox] / 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.020523 seconds and 4 git commands to generate.