Resolves: tdf#152411 clear before freeze to let gtk a11y drop reference

Change-Id: I2c0f852a0432e7319644b0ea11533b6d153b4ac7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143718
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index aab82ca..a52b5f8 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -554,8 +554,8 @@ void SmElementsControl::setElementSetId(TranslateId pSetId)

void SmElementsControl::addElements(const TranslateId& rCategory)
{
    mpIconView->clear(); // tdf#152411 clear before freeze to let gtk a11y drop reference
    mpIconView->freeze();
    mpIconView->clear();
    mpIconView->set_item_width(0);
    maItemDatas.clear();