diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/Typeface.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 0dc903a..06586ca 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -132,6 +132,9 @@ public class Typeface { * @return The best matching typeface. */ public static Typeface create(Typeface family, int style) { + if (style < 0 || style > 3) { + style = 0; + } long ni = 0; if (family != null) { // Return early if we're asked for the same face/style |