possible crash fixes
This commit is contained in:
parent
d99d5fcb7f
commit
7ccff46237
@ -47,6 +47,8 @@ void texture::bind()
|
||||
}
|
||||
|
||||
void texture::load(const std::string &path)
|
||||
{
|
||||
try
|
||||
{
|
||||
png::image<png::rgba_pixel> image(path);
|
||||
width = image.get_width();
|
||||
@ -63,6 +65,11 @@ void texture::load(const std::string &path)
|
||||
image.get_pixbuf().get_row(i).data(), image.get_width() * 4);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void texture::unload()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user