The scripture tells us that unless you are baptised and take the Eucharist, you are damned (John 3:5, John 6:54). We understand that the reality is a bit less harsh, and one who does not partake of the sacraments through no personal fault of his own is judged according to his works based on the light that he has been given. To put it a bit differently, mortal sin is rejection of God that is wilful. When a Muslim or a Protestant rejects the sacraments of the Church because this is how he was brought up to believe, there is no wilful personal rejection of the will of God, and hence no sin. This doctrine is called invincible ignorance.
Invincible ignorance, whether of the law or of the fact, is always a valid excuse and excludes sin. The evident reason is that neither this state nor the act resulting therefrom is voluntary. It is undeniable that a man cannot be invincibly ignorant of the natural law, so far as its first principles are concerned, and the inferences easily drawn therefrom. This, however, according to the teaching of St. Thomas, is not true of those remoter conclusions, which are deducible only by a process of laborious and sometimes intricate reasoning. Of these a person may be invincibly ignorant. Even when the invincible ignorance is concomitant, it prevents the act which it accompanies from being regarded as sinful. The perverse temper of soul, which in this case is supposed, retains, of course, such malice as it had. Vincible ignorance, being in some way voluntary, does not permit a man to escape responsibility for the moral deformity of his deeds; he is held to be guilty and in general the more guilty in proportion as his ignorance is more voluntary. Hence, the essential thing to remember is that the guilt of an act performed or omitted in vincible ignorance is not to be measured by the intrinsic malice of the thing done or omitted so much as by the degree of negligence discernible in the act.
Thanks for the refresher course on I.I. This sounds like a little more slack is cut for those who were not raised in Catholic homes than I had thought.