Commit 7fe232a5 authored by Daniel Garcia Moreno's avatar Daniel Garcia Moreno

Merge branch 'fix-media-overflow' into 'master'

media_viewer: Fix potential overflow when loading media viewer

See merge request !244
parents 2c9557f5 84b0ec82
Pipeline #35269 passed with stages
in 31 minutes and 1 second
......@@ -212,7 +212,7 @@ impl Data {
previous_media_button.set_visible(true);
}
if self.current_media_index >= self.media_list.len() - 1 {
if self.media_list.len() > 0 && self.current_media_index >= self.media_list.len() - 1 {
next_media_button.set_visible(false);
} else {
next_media_button.set_visible(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment