X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.i;h=a3192756eee5aaa8b883cd1c6f13ddfe636a3bf5;hb=375156c1125cfad326642d7b5882746f0b9c3554;hp=3dbe190cc417f76985630b6948c2e99d159756a1;hpb=bf49e7642027f576716e5742544c282f4396f9ef;p=chaz%2Fopenbox diff --git a/src/openbox.i b/src/openbox.i index 3dbe190c..a3192756 100644 --- a/src/openbox.i +++ b/src/openbox.i @@ -37,6 +37,8 @@ %} %extend ob::OBScreen { OBClient *client(int i) { + if (i >= (int)self->clients.size()) + return NULL; ob::OBScreen::ClientList::iterator it = self->clients.begin(); std::advance(it,i); return *it;