Was It The Right Thing To Do...

If the dog was so badly injured that there was little chance of survival then I believe you did the right thing in not prolonging the dogs pain and suffering.