possible fix for crash in #303

This commit is contained in:
Vadim Lopatin 2016-10-17 13:47:08 +03:00
parent da1aa0606a
commit 525bb5e45f
1 changed files with 1 additions and 1 deletions

View File

@ -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)