fix a bug for swt that crashes if no region available