vcl/unx/gtk3/gtk3gtkinst.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit fc59a701cceb6e83c00fc3c9fab747987376c00f Author: Caolán McNamara <[email protected]> AuthorDate: Mon May 18 17:23:41 2020 +0100 Commit: Caolán McNamara <[email protected]> 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 <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> 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)) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
