From 909f3e923cad7f1647f1eac076b01951a237047c Mon Sep 17 00:00:00 2001 From: sinkuu Date: Sun, 28 Aug 2016 15:56:13 +0900 Subject: [PATCH] Fix DropBox's drop --- src/event_loop/loop_data.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event_loop/loop_data.rs b/src/event_loop/loop_data.rs index 1236b0df6..f5dbfb6e1 100644 --- a/src/event_loop/loop_data.rs +++ b/src/event_loop/loop_data.rs @@ -330,8 +330,9 @@ mod dropbox { // Try our safe accessor first, and if it works then we know that // we're on the right thread. In that case we can simply drop as // usual. - if let Some(a) = self.get_mut().take() { - return drop(a) + if self.get().is_some() { + drop(self.inner.take().unwrap()); + return; } // If we're on the wrong thread but we actually have some data, then @@ -345,4 +346,3 @@ mod dropbox { } } } -