وَيَسْتَقْبِلُ الْقِبْلَةَ، إِلَّا أَنْ يَكُونَ خَائِفًا، فَيُصَلِّي إِلَى أَيِّ جِهَةٍ قَدَرَ
Translation: He faces the qiblah, unless afraid; then he prays in whatever direction he is able.
Facing the qiblah is a condition of prayer when it is known and possible.
A state of serious fear or danger that prevents safe orientation changes the requirement according to ability. This concession does not apply to every minor concern.