summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2009-12-17 09:27:42 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-17 09:27:42 -0800
commitf7ed3a2b0fd00c517671cc986b4b44d29b60ac28 (patch)
treedd11a02f587427a989954793180042ffcf800fa9 /graphics/java
parent3ea664640d0dd08cf89fd38f7aa00756651f4830 (diff)
parent0249c83ed014cc6a36caac30e55db62c29c204e2 (diff)
downloadframeworks_base-f7ed3a2b0fd00c517671cc986b4b44d29b60ac28.zip
frameworks_base-f7ed3a2b0fd00c517671cc986b4b44d29b60ac28.tar.gz
frameworks_base-f7ed3a2b0fd00c517671cc986b4b44d29b60ac28.tar.bz2
am 0249c83e: am 31a69fdb: 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
Merge commit '0249c83ed014cc6a36caac30e55db62c29c204e2' * commit '0249c83ed014cc6a36caac30e55db62c29c204e2': throw if we have a null typeface native instance (so we don't crash in native code)
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/Typeface.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index f0d5a6a..bc92d3a 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -143,6 +143,9 @@ public class Typeface {
// don't allow clients to call this directly
private Typeface(int ni) {
+ if (0 == ni) {
+ throw new RuntimeException("native typeface cannot be made");
+ }
native_instance = ni;
}