From df0dc791b636b7c8eafbd05e6007e82c9f83c714 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Fri, 21 May 2021 10:46:47 +0200 Subject: [PATCH] gtk: drop MainContext check there's no need to ensure we are initializing gtk on the main thread if gtk was not initialized yet --- gtk/src/rt.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gtk/src/rt.rs b/gtk/src/rt.rs index 9fab11f2c95c..ec2172d56bbd 100644 --- a/gtk/src/rt.rs +++ b/gtk/src/rt.rs @@ -117,10 +117,6 @@ pub fn init() -> Result<(), glib::BoolError> { let argv = ::std::env::args().take(1).collect::>(); if from_glib(ffi::gtk_init_check(&mut 1, &mut argv.to_glib_none().0)) { - if !glib::MainContext::default().is_owner() { - return Err(glib::bool_error!("Failed to acquire default main context")); - } - set_initialized(); Ok(()) } else {