Oh, no, Srinath, it was not for nought! You were saved from a relationship not meant for you. Perhaps, you learned something. At the very least, you walk away with a few good memories.
But, what you should carry with you is the knowledge that you were saved from a potential relationship disaster. You have the opportunity to love again and perhaps, many times. Don't take that chance lightly.