diff --git a/gb.gtk/src/CWidget.cpp b/gb.gtk/src/CWidget.cpp index 2158fa834..0e41b5aee 100644 --- a/gb.gtk/src/CWidget.cpp +++ b/gb.gtk/src/CWidget.cpp @@ -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));