If someone makes a rude comment or says a bad word and they realize they should not have said it and apologize to you YES it is OK to say "don't worry about it" or if it wasn't really that bad you can say "I don't mind." But you probably do not want to say "I don't mind" it it was inappropriate. It is a case of just thanking them for the apology.