mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 16:01:07 +01:00
[wasm-shape] Don't crash if font is bad
This commit is contained in:
1 parent
7df9b3dd89
commit
74a2f338c6
1 file changed
+5
@@ -425,6 +425,11 @@ retry:
|
||||
{
|
||||
DEBUG_MSG (WASM, module_inst, "Calling shape() failed: %s",
|
||||
wasm_runtime_get_exception (module_inst));
|
||||
if (!buffer->ensure_unicode ())
|
||||
{
|
||||
DEBUG_MSG (WASM, font, "Shape failed but buffer is not in Unicode; failing...");
|
||||
goto fail;
|
||||
}
|
||||
if (retried)
|
||||
{
|
||||
DEBUG_MSG (WASM, font, "Giving up...");
|
||||
|
||||
Reference in new issue
Block a user