Merge pull request #1961 from Airblader/bug-1957

Avoid freeze when moving container
This commit is contained in:
Michael Stapelberg 2015-09-28 08:19:23 +02:00
commit 2f9ed9c4c3
1 changed files with 2 additions and 2 deletions

View File

@ -1028,8 +1028,8 @@ bool con_move_to_mark(Con *con, const char *mark) {
target = TAILQ_FIRST(&(target->focus_head));
}
if (con == target) {
DLOG("cannot move the container to itself, aborting.\n");
if (con == target || con == target->parent) {
DLOG("cannot move the container to or inside itself, aborting.\n");
return false;
}