diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index f401b6dc1e..b3a42bade0 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -42,6 +42,7 @@ struct GoalListWindow : public Window { this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_GOAL_SCROLLBAR); this->FinishInitNested(window_number); + this->owner = (Owner)this->window_number; this->OnInvalidateData(0); } diff --git a/src/story_gui.cpp b/src/story_gui.cpp index e2a325911f..b6f02552d0 100644 --- a/src/story_gui.cpp +++ b/src/story_gui.cpp @@ -426,6 +426,7 @@ public: /* story_page_elements will get built by SetSelectedPage */ this->FinishInitNested(window_number); + this->owner = (Owner)this->window_number; /* Initialize selected vars. */ this->selected_generic_title[0] = '\0';