summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/texturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/texturemanager.cpp')
-rw-r--r--src/osd/modules/render/bgfx/texturemanager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/osd/modules/render/bgfx/texturemanager.cpp b/src/osd/modules/render/bgfx/texturemanager.cpp
index a03a6b46125..d539d1aae46 100644
--- a/src/osd/modules/render/bgfx/texturemanager.cpp
+++ b/src/osd/modules/render/bgfx/texturemanager.cpp
@@ -59,7 +59,11 @@ bgfx_texture* texture_manager::create_png_texture(std::string path, std::string
{
bitmap_argb32 bitmap;
emu_file file(path.c_str(), OPEN_FLAG_READ);
- render_load_png(bitmap, file, nullptr, file_name.c_str());
+ if (file.open(file_name) == osd_file::error::NONE)
+ {
+ render_load_png(bitmap, file);
+ file.close();
+ }
if (bitmap.width() == 0 || bitmap.height() == 0)
{