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