Paint: Flood fill freeze fix

thanks for the contribution, Kartik!