summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_cocoa/ecore_cocoa_cnp.m')
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_cnp.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
index da2db90aa0..03dcb22771 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_cnp.m
@@ -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)
{