Genesis 20:6

And God said to him in a dream, "Yes, I know that you did this in the integrity of your heart. For I also withheld you from sinning against Me; therefore I did not let you touch her.