From 5fa367c2cf5c83ed4beee05dd4ce54489a487ab7 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:07:26 +0200 Subject: Fix for issue #50: usage in plugins on Linux. --- src/Fl_lock.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index 732ceb905..a98be46ec 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -317,7 +317,9 @@ static void unlock_function_rec() { # endif // PTHREAD_MUTEX_RECURSIVE void Fl_Posix_System_Driver::awake(void* msg) { - if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ } + if (thread_filedes[1]) { + if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ } + } } static void* thread_message_; -- cgit v1.2.3