Hello dear,
I understand your concern.
In my opinion
pregnancy usually results when semen is ejaculated inside or around the vagina during the fertile period.
But just
masturbation will not result in pregnancy.
Birth control pills are effective of all
contraception methods to prevent unwanted pregnancy if they are taken regularly.
But as the true intercourse did not occur even the irregular intake might not result in pregnancy.
So relax.There is no chance of pregnancy.
When one pill is missed two pills are taken in the next day.
When two pills are missed continuously then two pills each are taken on two successive days.
When three pills are missed in a row the birth control pills might not work for that cycle and other method like condom should be used as back up.
Anyways as nothing like true intercourse was done there is no chance of pregnancy.
Hope this helps.
Best regards...Dr.Srilatha