[Libreoffice-commits] core.git: vcl/source vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 23 08:23:26 UTC 2019
vcl/source/window/dialog.cxx | 4 ++--
vcl/unx/gtk3/gtk3gtkinst.cxx | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 205eb935c286f52870d7ffd9b2d8b75c2d6bc57f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 22 16:14:29 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 23 10:22:23 2019 +0200
an assistant might have no parent
Change-Id: Id85bfe822b68aafd4bccdbae3a4ebdc6baa6be4a
Reviewed-on: https://gerrit.libreoffice.org/77967
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 9b5f0babe06a..b6e462ba72ea 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -224,10 +224,10 @@ void Accelerator::GenerateAutoMnemonicsOnHierarchy(const vcl::Window* pWindow)
if ( pWindow->GetType() == WindowType::TABPAGE )
{
vcl::Window* pParent = pWindow->GetParent();
- if ( pParent->GetType() == WindowType::TABCONTROL )
+ if (pParent && pParent->GetType() == WindowType::TABCONTROL )
pParent = pParent->GetParent();
- if ( (pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL )
+ if (pParent && (pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL )
{
pGetChild = pParent->GetWindow( GetWindowType::FirstChild );
while ( pGetChild )
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 4045e1c3c91c..fc0ccc8184fe 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -10916,7 +10916,8 @@ public:
GtkAssistant* pAssistant = GTK_ASSISTANT(gtk_builder_get_object(m_pBuilder, id.getStr()));
if (!pAssistant)
return nullptr;
- gtk_window_set_transient_for(GTK_WINDOW(pAssistant), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
+ if (m_pParentWidget)
+ gtk_window_set_transient_for(GTK_WINDOW(pAssistant), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
return std::make_unique<GtkInstanceAssistant>(pAssistant, this, bTakeOwnership);
}
More information about the Libreoffice-commits
mailing list