desktop-shell: Do not try to add a child to a non-existent parent
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 17 Jan 2020 10:32:55 +0000 (12:32 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 17 Jan 2020 10:47:32 +0000 (12:47 +0200)
commita27658e9813003b53132aeccfd3b9861ade5e559
treecb30ee0bf65544fda49144f4f51bc40caeb9bff6
parentc3c0b247a05da46eb032320f38428767acc26910
desktop-shell: Do not try to add a child to a non-existent parent

Introduced with a8da2084, it seems that there are cases when there's no
parent available (zenity, for instance).

Removes any potential child and re-initialize it, in case the parent is
not set. (Simon Ser)

Fixes: #340
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reported-by: n3rdopolis <bluescreenavenger@gmail.com>
desktop-shell/shell.c