Resolves: tdf#128132 language page not opened

Change-Id: I1936840b89963ddc74fa8d7509855fb566e62404
Reviewed-on: https://gerrit.libreoffice.org/80761
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 845e765..b9d79d0 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -795,7 +795,7 @@ void OfaTreeOptionsDialog::ActivateLastSelection()

        std::unique_ptr<weld::TreeIter> xTemp = xTreeLB->make_iterator();
        bool bTemp = xTreeLB->get_iter_first(*xTemp);
        while (!bTemp)
        while (bTemp)
        {
            // restore only selection of a leaf
            if (xTreeLB->get_iter_depth(*xTemp) && xTreeLB->get_id(*xTemp).toInt64())