X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fscreen.cc;h=e7ebd64cf1d1afb06abd79d40c69b74b6c49a88e;hb=41a38bbdaf245f12e58f2609092bfbcf8fba6f78;hp=eb9edc39fd93fcbbaad9e1e508761d04c322fd9f;hpb=2241f5c8eaa932d458791dc559f420b9dd58fef4;p=chaz%2Fopenbox diff --git a/util/epist/screen.cc b/util/epist/screen.cc index eb9edc39..e7ebd64c 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -474,6 +474,7 @@ void screen::cycleWindow(const bool forward, const int increment, const bool allscreens, const bool alldesktops, const bool sameclass, const string &cn) const { assert(_managed); + assert(increment > 0); if (_clients.empty()) return; @@ -485,7 +486,7 @@ void screen::cycleWindow(const bool forward, const int increment, begin = _clients.begin(), end = _clients.end(); - const XWindow *t; + const XWindow *t = 0; for (int x = 0; x < increment; ++x) { while (1) { @@ -530,8 +531,10 @@ void screen::cycleWindow(const bool forward, const int increment, } -void screen::cycleWorkspace(const bool forward, const int increment, const bool loop) const { +void screen::cycleWorkspace(const bool forward, const int increment, + const bool loop) const { assert(_managed); + assert(increment > 0); unsigned int destination = _active_desktop;