diff --git a/src/video/glvideo.c b/src/video/glvideo.c index 42177f3f..cae9bb73 100644 --- a/src/video/glvideo.c +++ b/src/video/glvideo.c @@ -893,6 +893,8 @@ __attribute__((constructor(CTOR_PRIORITY_EARLY))) static void _init_glvideo(void) { LOG("Initializing OpenGL renderer"); + assert((video_backend == NULL) && "there can only be one!"); + glvideo_backend.init = &gldriver_init; glvideo_backend.main_loop = &gldriver_main_loop; glvideo_backend.reshape = &gldriver_reshape; diff --git a/src/video/xvideo.c b/src/video/xvideo.c index 1d488e8a..7a553ddb 100644 --- a/src/video/xvideo.c +++ b/src/video/xvideo.c @@ -942,6 +942,8 @@ __attribute__((constructor(CTOR_PRIORITY_EARLY))) static void _init_xvideo(void) { LOG("Initializing X11 renderer"); + assert((video_backend == NULL) && "there can only be one!"); + xvideo_backend.init = &xdriver_init; xvideo_backend.main_loop = &xdriver_main_loop; xvideo_backend.reshape = &xdriver_reshape;