Skip to content

Commit

Permalink
font-manager: use CAMLReturn and fix deadlock
Browse files Browse the repository at this point in the history
Co-authored-by: Bryan Phelps <bryphe@outrunlabs.com>
  • Loading branch information
EduardoRFS and bryphe committed Jun 24, 2020
1 parent 338d44e commit 647daf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reason-font-manager/FontManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ CAMLprim value fm_findFont(value family, value weight, value width, value italic

delete query;

caml_acquire_runtime_system();

if (font == NULL) {
caml_raise_not_found();
return Val_unit;
CAMLreturn(Val_unit);
}

caml_acquire_runtime_system();

ret = caml_alloc(7, 0);

Store_field(ret, 0, caml_copy_string(font->path));
Expand Down

0 comments on commit 647daf6

Please sign in to comment.