We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bad63f commit 2660b68Copy full SHA for 2660b68
src/Plugin.cpp
@@ -87,6 +87,9 @@ void on_ref_lua_state_created(lua_State* l) try {
87
auto image_path = images_path / filepath;
88
89
std::filesystem::create_directories(images_path);
90
+ if (!std::filesystem::is_regular_file(image_path)) {
91
+ return std::shared_ptr<D2DImage>{nullptr};
92
+ }
93
94
return std::make_shared<D2DImage>(g_plugin->d2d->wic(), g_plugin->d2d->context(), image_path);
95
},
0 commit comments