fixed segfault in tree widget (bnc #866145)