diff --git a/containment.cpp b/containment.cpp index 7e56d8d6c..383c3ac9a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -406,8 +406,7 @@ void Containment::setScreen(int screen) //kDebug() << "setting screen to" << screen; QDesktopWidget desktop; - int numScreens = desktop.numScreens(); - if (screen < -1 || screen > numScreens - 1) { + if (screen < -1 || screen > desktop.numScreens() - 1) { screen = -1; }