[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 18 20:12:08 UTC 2020
vcl/unx/gtk3/gtk3gtkinst.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit fc59a701cceb6e83c00fc3c9fab747987376c00f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 18 17:23:41 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 18 22:11:28 2020 +0200
don't bother undoing the replacement of combobox if unparented
as seen in tdf#133098 example
Change-Id: I58bf5c5c931cbd1f002ff28f6844d0bebcdd1913
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94440
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 503da469aef5..530a115bd96b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1714,11 +1714,15 @@ namespace
void replaceWidget(GtkWidget* pWidget, GtkWidget* pReplacement)
{
- g_object_ref(pWidget);
-
// remove the widget and replace it with pReplacement
GtkWidget* pParent = gtk_widget_get_parent(pWidget);
+ // if pWidget was un-parented then don't bother
+ if (!pParent)
+ return;
+
+ g_object_ref(pWidget);
+
gint nTopAttach(0), nLeftAttach(0), nHeight(1), nWidth(1);
if (GTK_IS_GRID(pParent))
{
More information about the Libreoffice-commits
mailing list