I'm 16... and I haven't found myself in such a situation yet... but I know that you dealt with it the right way. If you got mad at her, she wouldn't in the future feel like she could go to you, now she knows that it's safe and she can trust you. If you got mad at her that could've been a long term problem.
Now because you were calm with her, you can trust that in the future, she will more likely then not, come to you before making a decision she may regret later.
Bravo! You couldn't of done a better job