Annie thank you for posting your drawing of Nicholas and Olga, it's beautiful<3.
Whether Nicholas gave Olga the pistol before or after the captivity, I think it was a gift to show his respect to her for becoming an intelligent and responsible adult, it’s a gift that shows he trust her, he knew that Olga will never misused it. And if Nicholas gave the pistol during captivity, I don’t think he gave her hints that she could use it against the guards if she found herself in a dangerous position, he knew taking actions against the captors will put his family in greater danger and risk. And I don’t think Olga would ever use it to shoot someone, let’s not to forget during her nursing days, they assigned her with office work because she couldn’t handle seeing the wounds, that’s show how sensitive and emotional person she was, so imo she couldn’t hurt anyone with that gun, she would live in a great guilt.