If everything else was running smoothly and cooler heads prevailed, I don't think that not having a male heir would have jeopardized the Russia monarchy. There were two options, either have the nearest male relative inherit, or Nicholas could have changed the rules and declared his oldest daughter his heir. Russia had female emperors in the past, including Catherine the Great, who was not even born into the Russian Imperial family, rather she married into it. The rule where only males can inherit came about because a previous tsar wanted it to be that way and declared it so, Nicholas, in turn, could gave exercised his autocratic prerogative and named Olga his heir.