From 78730221d169f04e3cd37a0986eaf8eb8105f934 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Wed, 25 Sep 2019 22:09:18 -0400 Subject: [PATCH] Fix a dumb mistake in null checking... D'oh. --- src/driver.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver.rs b/src/driver.rs index 26bde37..3876752 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -95,10 +95,10 @@ impl MediaDriver { impl Drop for MediaDriver { fn drop(&mut self) { - if self.c_driver.is_null() { + if !self.c_driver.is_null() { unsafe { aeron_op!(aeron_driver_close(self.c_driver)) }.unwrap(); } - if self.c_context.is_null() { + if !self.c_context.is_null() { unsafe { aeron_op!(aeron_driver_context_close(self.c_context)) }.unwrap(); } }