mirror of https://github.com/buggins/dlangui.git
possible fix for crash in #303
This commit is contained in:
parent
da1aa0606a
commit
525bb5e45f
|
@ -1580,7 +1580,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// returns parent widget, null for top level widget
|
/// returns parent widget, null for top level widget
|
||||||
@property Widget parent() const { return cast(Widget)_parent; }
|
@property Widget parent() const { return _parent ? cast(Widget)_parent : null; }
|
||||||
/// sets parent for widget
|
/// sets parent for widget
|
||||||
@property Widget parent(Widget parent) { _parent = parent; return this; }
|
@property Widget parent(Widget parent) { _parent = parent; return this; }
|
||||||
/// returns window (if widget or its parent is attached to window)
|
/// returns window (if widget or its parent is attached to window)
|
||||||
|
|
Loading…
Reference in New Issue