You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this commit we added some code to toml_edit_item_get_type that checks if the item reference passed in from LabVIEW is null. If it is null, we don't try to deference it and just return a "None" value. We should do similar checks in other functions when receiving object references from LabVIEW before we de-reference them. If we don't, then we'll end up getting Error 1097 and/or crashing LabVIEW.
...// check if item has a null value
if item.is_null(){let raw_string = matchCString::new("None").unwrap().into_raw(){
ptr if ptr.is_null() => {println!("Unable to allocate memory for string");returnCString::new("").unwrap().into_raw();}
ptr => ptr,};return raw_string;}// de-reference the itemlet item = unsafe{&mut*(item as*mutItem)};
...
The text was updated successfully, but these errors were encountered:
In this commit we added some code to
toml_edit_item_get_type
that checks if theitem
reference passed in from LabVIEW is null. If it is null, we don't try to deference it and just return a"None"
value. We should do similar checks in other functions when receiving object references from LabVIEW before we de-reference them. If we don't, then we'll end up getting Error 1097 and/or crashing LabVIEW.The text was updated successfully, but these errors were encountered: