After using the detectTextSWT function, the program crashes

outTextRegions is empty here:

i think it must be checked (bug)