Fix a dumb mistake in null checking...

D'oh.
pull/6/head
Bradlee Speice 2019-09-25 22:09:18 -04:00
parent 8b0ee22e1b
commit 78730221d1
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}
}