forked from enlightenment/efl
ecore_cocoa_cnp: Check for nil object before adding.
This is fixing a segfault. More work needs to be done in efl_selection_manager.c. Current status is broken.
This commit is contained in:
parent
a939b57c7b
commit
11b291aabe
|
@ -24,7 +24,8 @@ ecore_cocoa_clipboard_set(const void *data,
|
|||
str = [[NSString alloc] initWithBytes: data
|
||||
length: size
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[objects addObject: str];
|
||||
if (str)
|
||||
[objects addObject: str];
|
||||
}
|
||||
if (type & ECORE_COCOA_CNP_TYPE_MARKUP)
|
||||
{
|
||||
|
@ -35,7 +36,8 @@ ecore_cocoa_clipboard_set(const void *data,
|
|||
length: strlen(utf8) // XXX strlen() ?
|
||||
encoding: NSUTF8StringEncoding];
|
||||
free(utf8);
|
||||
[objects addObject: str];
|
||||
if (str)
|
||||
[objects addObject: str];
|
||||
}
|
||||
if (type & ECORE_COCOA_CNP_TYPE_IMAGE)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue