diff options
author | rathnor <rathnor> | 2003-05-04 13:04:31 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-05-04 13:04:31 (GMT) |
commit | 1762dd8a0bc64c88942908dd87bd94f0fa910ae0 (patch) | |
tree | f1406da7c3f7d6d983982296095d389299dee5d3 | |
parent | 2e3b3094af92dd09d9925a4e62c2637c96ff4991 (diff) | |
download | fluxbox_lack-1762dd8a0bc64c88942908dd87bd94f0fa910ae0.zip fluxbox_lack-1762dd8a0bc64c88942908dd87bd94f0fa910ae0.tar.bz2 |
fix segfault on restart/close when icons exist
-rw-r--r-- | src/Screen.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 89ef2a7..7677ec9 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.142 2003/04/28 22:43:26 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.143 2003/05/04 13:04:31 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -959,10 +959,10 @@ void BScreen::removeIcon(FluxboxWindow *w) { | |||
959 | } | 959 | } |
960 | 960 | ||
961 | void BScreen::removeWindow(FluxboxWindow *win) { | 961 | void BScreen::removeWindow(FluxboxWindow *win) { |
962 | Workspaces::iterator it = workspacesList.begin(); | 962 | if (win->isIconic()) |
963 | Workspaces::iterator it_end = workspacesList.end(); | 963 | removeIcon(win); |
964 | for (; it != it_end; ++it) | 964 | else |
965 | (*it)->removeWindow(win); | 965 | getWorkspace(win->getWorkspaceNumber())->removeWindow(win); |
966 | } | 966 | } |
967 | 967 | ||
968 | 968 | ||
@@ -2276,10 +2276,7 @@ void BScreen::shutdown() { | |||
2276 | workspacesList.end(), | 2276 | workspacesList.end(), |
2277 | mem_fun(&Workspace::shutdown)); | 2277 | mem_fun(&Workspace::shutdown)); |
2278 | 2278 | ||
2279 | while (!iconList.empty()) { | 2279 | |
2280 | iconList.back()->restore(true); // restore with remap | ||
2281 | delete iconList.back(); // the window removes it self from iconlist | ||
2282 | } | ||
2283 | 2280 | ||
2284 | 2281 | ||
2285 | #ifdef SLIT | 2282 | #ifdef SLIT |