Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 417675ca authored by Peter Eliasson's avatar Peter Eliasson Committed by Johan Redestig
Browse files

Improved error handling when font loading fails.

Without this patch, an application could trigger a platform crash
by calling:

  Typeface typeface = Typeface.createFromFile("");
  boolean isbold = typeface.isBold();

The crash occurs since the Skia error that occurs when font loading
fails is not propagated.
With this patch, the Typeface constructor throws an
IllegalStateException when Skia fails to load the font (i.e. when
the native instance is null).

Change-Id: I1002b37b7b32840cb7eeef6819d2982cb18c9003
parent 5a870fee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment