mirror of https://github.com/axmolengine/axmol.git
Get the raw pointer on creation of the FileStream to avoid any accidental usage of the unique_ptr.
This commit is contained in:
parent
13115cc789
commit
0583f9a4e0
|
@ -174,7 +174,7 @@ bool FontFreeType::createFontObject(const std::string &fontName, float fontSize)
|
|||
auto fullPath = FileUtils::getInstance()->fullPathForFilename(fontName);
|
||||
if (fullPath.empty()) return false;
|
||||
|
||||
auto fs = FileUtils::getInstance()->openFileStream(fullPath, FileStream::Mode::READ);
|
||||
auto fs = FileUtils::getInstance()->openFileStream(fullPath, FileStream::Mode::READ).release();
|
||||
if (!fs)
|
||||
{
|
||||
return false;
|
||||
|
@ -187,7 +187,7 @@ bool FontFreeType::createFontObject(const std::string &fontName, float fontSize)
|
|||
fts->size = fs->tell();
|
||||
fs->seek(0, SEEK_SET);
|
||||
|
||||
fts->descriptor.pointer = fs.release();
|
||||
fts->descriptor.pointer = fs;
|
||||
|
||||
FT_Open_Args args = { 0 };
|
||||
args.flags = FT_OPEN_STREAM;
|
||||
|
|
Loading…
Reference in New Issue