summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/pbd/crossthread.posix.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/pbd/crossthread.posix.cc b/libs/pbd/crossthread.posix.cc
index e3f6df5a31..72a4fad810 100644
--- a/libs/pbd/crossthread.posix.cc
+++ b/libs/pbd/crossthread.posix.cc
@@ -2,6 +2,7 @@
CrossThreadChannel::CrossThreadChannel (bool non_blocking)
: receive_channel (0)
+ , receive_source (0)
{
fds[0] = -1;
fds[1] = -1;
@@ -28,8 +29,14 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
CrossThreadChannel::~CrossThreadChannel ()
{
- if (receive_channel) {
+ if (receive_source) {
+ g_source_destroy (receive_source);
+ receive_source = 0;
+ }
+
+ if (receive_channel) {
g_io_channel_unref (receive_channel);
+ receive_channel = 0;
}
if (fds[0] >= 0) {