Should a windown somehow be opened in a pressurized aircraft, it would lose cabin pressure requiring a descent to a safe breathing altitude. As long as the person seating next to the window has his/her seatbelt fastened, there should be no danger. It would get cold, windy, noisy and uncomfortable.