fix logic error of an if condition
causing thread enter to be run conditionally whilst operating on GUI objects and leaving critical section unconditionally
also ensured there are room for the terminating \0 byte in the name string.
causing thread enter to be run conditionally whilst operating on GUI objects and leaving critical section unconditionally
also ensured there are room for the terminating \0 byte in the name string.