Prevent crash in Lua bindings.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 17 Dec 2013 14:28:19 +0000 (14:28 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 17 Dec 2013 14:28:19 +0000 (14:28 +0000)
commit77887af13f1f0a2e349155f74e6b5ded6aafe179
tree9c46e95ad5a4b629ce3dba804f789b5a001ef35f
parent090601c9170b4157d141676344d15dad1931f441
Prevent crash in Lua bindings.

SkPaint::getTypeface() can return NULL; paint:getTypeface() would
attempt to refcount that value before storing it on the Lua stack
and crash. This is a minimal workaround that fixes the crash.

R=reed@google.com, tomhudson@google.com, robertphillips@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/109793010

git-svn-id: http://skia.googlecode.com/svn/trunk@12706 2bbb7eff-a529-9590-31e7-b0007b416f81
src/utils/SkLua.cpp