-
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
image
.image_info()
.key_value
.as_ref()
.map(|x| glib::StrV::from_iter(x.keys().map(|x| glib::GString::from(x))))
.unwrap_or_default()
.into_raw()
This code can return a null pointer, requiring an extra null check before iterating elements like here
I think this should return a direct null pointer, but a pointer to NULL or whatever
https://github.com/gtk-rs/gtk-rs-core/blob/main/glib/src/collections/strv.rs#L650
// rustdoc-stripper-ignore-next
/// Consumes the slice and returns the underlying pointer.
///
/// This is guaranteed to be `NULL`-terminated.
#[inline]
pub fn into_raw(mut self) -> *mut *mut c_char {
if self.len == 0 {
ptr::null_mut()
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working