This website works better with JavaScript.
Home
Help
Sign In
DISTRHO
/
DPF
mirror of
https://github.com/DISTRHO/DPF
Watch
1
Star
0
Fork
0
Code
Releases
0
Activity
Browse Source
Fix leak when fonsAddFontMem fails
Signed-off-by: falkTX <falktx@falktx.com>
pull/375/head
falkTX
Filipe Coelho
<falktx@falktx.com>
3 years ago
parent
a256e8fba3
commit
cbc326aa30
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
dgl/src/nanovg/fontstash.h
+ 3
- 0
dgl/src/nanovg/fontstash.h
View File
@@ -967,7 +967,10 @@ int fonsAddFontMem(FONScontext* stash, const char* name, unsigned char* data, in
int idx = fons__allocFont(stash);
if (idx == FONS_INVALID)
{
if (freeData && data) free(data);
return FONS_INVALID;
}
font = stash->fonts[idx];
Write
Preview
Loading…
Cancel
Save