diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-08-15 18:35:34 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-08-15 18:35:34 +0000 |
| commit | 352163bd649cbf0060883f612de296923e0d22a6 (patch) | |
| tree | 382c8d7175c33b4b76ca6f984fcc42ecf0ddb682 /util | |
| parent | 89bd8afdb84c580f11126c2b0da85e575c3d8d30 (diff) | |
make sure the increments are > 0.
Diffstat (limited to 'util')
| -rw-r--r-- | util/epist/screen.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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; |
