Commit 34776865 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* check whether p_item->input.psz_name exists, because stringWith*String...

* check whether p_item->input.psz_name exists, because stringWith*String crashes on non-existant strings
parent ad9f1332
......@@ -304,11 +304,15 @@
if( [[o_tc identifier] isEqualToString:@"1"] )
{
o_value = [NSString stringWithUTF8String:
p_item->input.psz_name];
if( o_value == NULL )
o_value = [NSString stringWithCString:
/* sanity check to prevent the NSString class from crashing */
if( p_item->input.psz_name != NULL )
{
o_value = [NSString stringWithUTF8String:
p_item->input.psz_name];
if( o_value == NULL )
o_value = [NSString stringWithCString:
p_item->input.psz_name];
}
}
else if( [[o_tc identifier] isEqualToString:@"2"] )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment