tree: Fix segfault form none UI thread refresh
tree: Fix segfault form none UI thread refresh

HelioGuilherme66/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,HelioGuilherme66/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,caio2k/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,HelioGuilherme66/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,caio2k/RIDE,caio2k/RIDE