Skip to content

Commit

Permalink
possible fix for crash in #303
Browse files Browse the repository at this point in the history
  • Loading branch information
buggins committed Oct 17, 2016
1 parent da1aa06 commit 525bb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dlangui/widgets/widget.d
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ public:
}

/// 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
@property Widget parent(Widget parent) { _parent = parent; return this; }
/// returns window (if widget or its parent is attached to window)
Expand Down

0 comments on commit 525bb5e

Please sign in to comment.