X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=util%2Fepist%2Fscreen.cc;h=8163107391de84ea015d1bbf3597096054342b20;hb=551a17d2563679eb6ef7c650f1384ee7e48dbc29;hp=7ac5780b1c59f4ce62543e029fee4e6496d7608f;hpb=d856db568a5933555191a35778dfa9cf0f619f8f;p=chaz%2Fopenbox diff --git a/util/epist/screen.cc b/util/epist/screen.cc index 7ac5780b..81631073 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -475,6 +475,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; @@ -486,7 +487,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) { @@ -531,8 +532,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;