From d26f116b98f4a3ae3b1d4e397d254fe58c6d2a24 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 2 Jan 2024 00:15:47 +0100 Subject: [PATCH] Fix crash due to player_video().first becoming null sometime between it being passed into the method and then being re-read via another call to player_video(). --- src/wx/gl_video_view.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index 397693f51..06c9f268b 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -621,9 +621,9 @@ GLVideoView::set_image (shared_ptr pv) auto const canvas_size = _canvas_size.load(); int const canvas_width = canvas_size.GetWidth(); int const canvas_height = canvas_size.GetHeight(); - auto const inter_position = player_video().first->inter_position(); - auto const inter_size = player_video().first->inter_size(); - auto const out_size = player_video().first->out_size(); + auto const inter_position = pv->inter_position(); + auto const inter_size = pv->inter_size(); + auto const out_size = pv->out_size(); auto const crop_guess = _viewer->crop_guess(); auto x_offset = std::max(0, (canvas_width - out_size.width) / 2); -- 2.30.2