Merge branch 'master' of https://bitbucket.org/omigamedev/new_engine
This commit is contained in:
@@ -1400,8 +1400,11 @@ void ui::Canvas::project_open_thread(std::string file_path)
|
||||
fread(compressed.data(), 1, data_size, fp);
|
||||
int imgw, imgh, imgc;
|
||||
uint8_t* rgba = stbi_load_from_memory(compressed.data(), data_size, &imgw, &imgh, &imgc, 4);
|
||||
std::copy(rgba, rgba + (imgw*imgh * 4), snap.image[plane_index].get());
|
||||
delete rgba;
|
||||
if (rgba)
|
||||
{
|
||||
std::copy(rgba, rgba + (imgw*imgh * 4), snap.image[plane_index].get());
|
||||
delete rgba;
|
||||
}
|
||||
}
|
||||
|
||||
progress++;
|
||||
|
||||
Reference in New Issue
Block a user