summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-02 00:15:47 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-02 00:15:47 +0100
commitd26f116b98f4a3ae3b1d4e397d254fe58c6d2a24 (patch)
tree795114ef2ce72a22a408070d4e26cfec22e45689
parent7c61fb83aab4fe573a06a2c638d9124d0a1dc51b (diff)
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().
-rw-r--r--src/wx/gl_video_view.cc6
1 files 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<const PlayerVideo> 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);