Fix a bug that data of nv::Image is always nullptr.

This commit is contained in:
Lendy Zhang 2020-04-13 11:45:53 +08:00
parent b126406886
commit 50d585c9c7

View File

@ -44,13 +44,13 @@ void Image::allocate(uint w, uint h, uint d/*= 1*/)
data = realloc<Color32>(data, w * h * d); data = realloc<Color32>(data, w * h * d);
} }
void Image::acquire(Color32 * data, uint w, uint h, uint d/*= 1*/) void Image::acquire(Color32 * rawdata, uint w, uint h, uint d/*= 1*/)
{ {
free(); free();
width = w; width = w;
height = h; height = h;
depth = d; depth = d;
data = data; data = rawdata;
} }
void Image::free() void Image::free()