]> Dogcows Code - chaz/openbox/blobdiff - src/openbox_wrap.cc
move the Openbox::instance pointer to simply "openbox".
[chaz/openbox] / src / openbox_wrap.cc
index e26d59e12b0314ffa7a8d4e7b0e5aaf4206cf344..d098ed8b7c948a12f58267964b0510cc54549b8b 100644 (file)
@@ -813,7 +813,7 @@ std::string SwigString_AsString(PyObject* o) {
 #include <stdexcept>
 
 
-  ob::Openbox *Openbox_instance() { return ob::Openbox::instance; }
+  ob::Openbox *Openbox_instance() { return ob::openbox; }
 
 
 namespace ob {
@@ -889,7 +889,7 @@ void python_callback(PyObject *func, KeyData *data)
 #include "ustring.hh"
 
 ob::Client *ob_Screen_client(ob::Screen *self,int i){
-    if (i >= (int)self->clients.size())
+    if (i < 0 || i >= (int)self->clients.size())
       return NULL;
     ob::Client::List::iterator it = self->clients.begin();
     std::advance(it,i);
This page took 0.025416 seconds and 4 git commands to generate.