mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +00:00
Merge tag '17.0.3'
Adding check for NULL char pointer before converting to string.
This commit is contained in:
commit
3be6715eba
@ -525,8 +525,11 @@ int var_set_base( const char * var , T value , const char * units ) {
|
||||
V_DATA v_data ;
|
||||
v_tree.v_data = &v_data ;
|
||||
var_set_value( v_data , value) ;
|
||||
//ref->units = (char *)units ;
|
||||
ref->units = (char *)(map_trick_units_to_udunits(units).c_str()) ;
|
||||
if ( units != NULL ) {
|
||||
ref->units = (char *)(map_trick_units_to_udunits(units).c_str()) ;
|
||||
} else {
|
||||
ref->units = (char *)units ;
|
||||
}
|
||||
ref_assignment(ref , &v_tree) ;
|
||||
free(ref) ;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user