mirror of
https://github.com/bspeice/aeron-rs
synced 2024-12-22 05:48:10 -05:00
Fix a dumb mistake in null checking...
D'oh.
This commit is contained in:
parent
8b0ee22e1b
commit
78730221d1
@ -95,10 +95,10 @@ impl MediaDriver {
|
|||||||
|
|
||||||
impl Drop for MediaDriver {
|
impl Drop for MediaDriver {
|
||||||
fn drop(&mut self) {
|
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();
|
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();
|
unsafe { aeron_op!(aeron_driver_context_close(self.c_context)) }.unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user