diff options
Diffstat (limited to 'vcl/unx/gtk/gtkinst.cxx')
-rw-r--r-- | vcl/unx/gtk/gtkinst.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx index db0aa9b783e4..8a45c62abc8b 100644 --- a/vcl/unx/gtk/gtkinst.cxx +++ b/vcl/unx/gtk/gtkinst.cxx @@ -99,7 +99,9 @@ extern "C" GtkYieldMutex *pYieldMutex; // init gdk thread protection - if ( !g_thread_supported() ) + bool const sup = g_thread_supported(); + // extracted from the 'if' to avoid Clang -Wunreachable-code + if ( !sup ) g_thread_init( nullptr ); gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave); |