Not completely the same, but two of my best friends got together a few years back, and recently they split up for some fairly strong reasons. One of them being she fell in love with his house-mate, and now they have moved away together. I am still best friends with both of them, however, as they know they can't ask me to choose between them and they never would anyway. It ended on fairly bad terms, there is a lot of bad feeling between them, but neither of them begrudge me the relationships I still hold with them both.
If they are your true friend, they should understand and not hold it against you if you still maintain a healthy relationship with each of them. :)