Browse Source

nanovg: guard loadSharedResources against init failure

pull/169/head
JP Cimalando Filipe Coelho <falktx@falktx.com> 5 years ago
parent
commit
b4d02d7920
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      dgl/src/NanoVG.cpp

+ 2
- 0
dgl/src/NanoVG.cpp View File

@@ -918,6 +918,8 @@ int NanoVG::textBreakLines(const char* string, const char* end, float breakRowWi
#ifndef DGL_NO_SHARED_RESOURCES
void NanoVG::loadSharedResources()
{
if (fContext == nullptr) return;

if (nvgFindFont(fContext, NANOVG_DEJAVU_SANS_TTF) >= 0)
return;



Loading…
Cancel
Save