Merge pull request #163 from g4z3r/master

fix crash when change font settings
This commit is contained in:
Vadim Lopatin 2016-01-29 07:01:55 +03:00
commit e18506dfed
2 changed files with 2 additions and 2 deletions

View File

@ -646,7 +646,7 @@ class FreeTypeFontManager : FontManager {
bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0, bool dontLoadFile = false) { bool registerFont(string filename, FontFamily family = FontFamily.SansSerif, string face = null, bool italic = false, int weight = 0, bool dontLoadFile = false) {
if (_library is null) if (_library is null)
return false; return false;
Log.v("FreeTypeFontManager.registerFont ", filename, " ", family, " ", face, " italic=", italic, " weight=", weight); //Log.v("FreeTypeFontManager.registerFont ", filename, " ", family, " ", face, " italic=", italic, " weight=", weight);
if (!exists(filename) || !isFile(filename)) { if (!exists(filename) || !isFile(filename)) {
Log.d("Font file ", filename, " not found"); Log.d("Font file ", filename, " not found");
return false; return false;

View File

@ -412,7 +412,7 @@ private abstract class GLCache
_activePage = null; _activePage = null;
foreach(i; 0 .. _pages.length) foreach(i; 0 .. _pages.length)
if (_pages[i] == page) { if (_pages[i] == page) {
_pages.remove(i); _pages = _pages.remove(i);
break; break;
} }
destroy(page); destroy(page);