Merge branch 'wip/otte/for-main' into 'main'

video: Don't try to play no media stream

See merge request GNOME/gtk!6853
This commit is contained in:
Benjamin Otte
2024-02-07 18:44:58 +00:00
2 changed files with 3 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ gsk_get_float (uint id)
#define gsk_get_int(id) (floatBitsToInt(gsk_get_float(id)))
#define gsk_get_uint(id) (floatBitsToUint(gsk_get_float(id)))
#ifdef GSK_GLES
#if __VERSION__ < 400 || defined(GSK_GLES)
vec4
gsk_texture (uint id,

View File

@@ -190,7 +190,8 @@ overlay_clicked_cb (GtkGestureClick *gesture,
{
GtkVideo *self = data;
gtk_media_stream_set_playing (self->media_stream, !gtk_media_stream_get_playing (self->media_stream));
if (self->media_stream)
gtk_media_stream_set_playing (self->media_stream, !gtk_media_stream_get_playing (self->media_stream));
}
static void