Commit a4dd60ac authored by danakj@chromium.org's avatar danakj@chromium.org

Use SkSafeRef when claiming a ref on the SkImageFilter at the WebKit API boundary.

Avoids a NULL deref when then image filter is NULL.

BUG=wkb.ug/103990
TBR=jamesr
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11308354

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171014 0039d316-1c4b-4281-b951-d872f2087c98
parent e621b597
......@@ -241,7 +241,7 @@ void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters)
void WebLayerImpl::setFilter(SkImageFilter* filter)
{
filter->ref(); // Claim a reference for the compositor.
SkSafeRef(filter); // Claim a reference for the compositor.
m_layer->setFilter(skia::AdoptRef(filter));
}
......
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