diff options
Diffstat (limited to 'openssl/src/stack.rs')
| -rw-r--r-- | openssl/src/stack.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl/src/stack.rs b/openssl/src/stack.rs index 268afde7..6ac8264c 100644 --- a/openssl/src/stack.rs +++ b/openssl/src/stack.rs @@ -86,6 +86,8 @@ impl<T: Stackable> ForeignType for Stack<T> { #[inline] unsafe fn from_ptr(ptr: *mut T::StackType) -> Stack<T> { + assert!(!ptr.is_null(), "Must not instantiate a Stack from a null-ptr - use Stack::new() in \ + that case"); Stack(ptr) } |