diff options
author | Mike Reed <reed@google.com> | 2009-12-14 14:57:01 -0500 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-12-17 12:18:44 -0500 |
commit | 31a69fdbe1edd8d686043e8ca7d278289f65808e (patch) | |
tree | e6f5e22a0149a7239cd8a13d2cfdf9f743bede77 /core/jni/android | |
parent | e96b6838b5a7ec3b4368e2449af9fbf0a8b75f16 (diff) | |
download | frameworks_base-31a69fdbe1edd8d686043e8ca7d278289f65808e.zip frameworks_base-31a69fdbe1edd8d686043e8ca7d278289f65808e.tar.gz frameworks_base-31a69fdbe1edd8d686043e8ca7d278289f65808e.tar.bz2 |
throw if we have a null typeface native instance (so we don't crash in native code)
we may still have to native-destroy a Typeface with a null ref, so check for that
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/Typeface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Typeface.cpp b/core/jni/android/graphics/Typeface.cpp index 238ece1..7c7bfeb 100644 --- a/core/jni/android/graphics/Typeface.cpp +++ b/core/jni/android/graphics/Typeface.cpp @@ -46,7 +46,7 @@ static SkTypeface* Typeface_createFromTypeface(JNIEnv* env, jobject, SkTypeface* } static void Typeface_unref(JNIEnv* env, jobject obj, SkTypeface* face) { - face->unref(); + SkSafeUnref(face); } static int Typeface_getStyle(JNIEnv* env, jobject obj, SkTypeface* face) { |