Control.Parent does not crash anymore.

[GB.GTK]
* BUG: Control.Parent does not crash anymore.

[GB.GTK3]
* BUG: Control.Parent does not crash anymore.
This commit is contained in:
gambas 2018-11-29 23:55:09 +01:00
parent b4d3c7612a
commit b3c305d8bf

View file

@ -791,8 +791,11 @@ BEGIN_PROPERTY(Control_Parent)
gContainer *parent = CONTROL->parent();
while (parent->proxyContainerFor())
parent = parent->proxyContainerFor();
if (parent)
{
while (parent->proxyContainerFor())
parent = parent->proxyContainerFor();
}
GB.ReturnObject(GetObject(parent));