mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
fixing issue when destroying an image in the loop hook, begenning single time command buffers manager
This commit is contained in:
@@ -74,8 +74,16 @@ namespace mlx::core
|
||||
|
||||
void Application::texturePut(void* win, void* img, int x, int y)
|
||||
{
|
||||
if(img == nullptr)
|
||||
{
|
||||
core::error::report(e_kind::error, "wrong texture (NULL)");
|
||||
return;
|
||||
}
|
||||
Texture* texture = static_cast<Texture*>(img);
|
||||
_graphics[*static_cast<int*>(win)]->texturePut(texture, x, y);
|
||||
if(!texture->isInit())
|
||||
core::error::report(e_kind::error, "trying to put a texture that has been destroyed");
|
||||
else
|
||||
_graphics[*static_cast<int*>(win)]->texturePut(texture, x, y);
|
||||
}
|
||||
|
||||
int Application::getTexturePixel(void* img, int x, int y)
|
||||
|
||||
Reference in New Issue
Block a user