>>>>> "Aric" == Aric Stewart <aric@codeweavers.com> writes: Aric> This is a bit of a cover to help find other problems, but we would Aric> crash if trying to sort a treeview with null strings in it. This Aric> prevents this crash so that one can try to figure out why we have Aric> empty strings. Aric> CHANGELOG: prevent crash on sorting treeview with null strings Aric> - return strcasecmp(first->pszText, second->pszText); + if Aric> (first->pszText && second->pszText) + return Aric> strcasecmp(first->pszText, second->pszText); + else if Aric> (first->pszText) + return -1; + else if (second->pszText) + return Aric> 1; + else + return 0; } Should this fail silently? Bye -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------