https://bugs.webkit.org/show_bug.cgi?id=78577
Reviewed by Dan Bernstein.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::setBufferForType): Missing null check when
setting data to the NSPasteboard.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107753
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-14 Enrica Casucci <enrica@apple.com>
+
+ REGRESSION (r107568-r107627): Crash when copying in WebCore::SharedBuffer::hasPlatformData().
+ https://bugs.webkit.org/show_bug.cgi?id=78577
+
+ Reviewed by Dan Bernstein.
+
+ * platform/mac/PlatformPasteboardMac.mm:
+ (WebCore::PlatformPasteboard::setBufferForType): Missing null check when
+ setting data to the NSPasteboard.
+
2012-02-14 Ryosuke Niwa <rniwa@webkit.org>
Crash in WebCore::SVGElement::removedFromDocument
void PlatformPasteboard::setBufferForType(PassRefPtr<SharedBuffer> buffer, const String& pasteboardType)
{
- [m_pasteboard.get() setData:[buffer->createNSData() autorelease] forType:pasteboardType];
+ [m_pasteboard.get() setData:buffer ? [buffer->createNSData() autorelease] : nil forType:pasteboardType];
}
void PlatformPasteboard::setPathnamesForType(const Vector<String>& pathnames, const String& pasteboardType)