Added check to allocateImage() so that if the pixel size wouldn't be computed
unless valid _data already existed on the object.
This commit is contained in:
parent
ee30f2e30c
commit
a36d45e68b
@ -302,7 +302,9 @@ void Image::allocateImage(int s,int t,int r,
|
||||
{
|
||||
_mipmapData.clear();
|
||||
|
||||
unsigned int previousTotalSize = computeRowWidthInBytes(_s,_pixelFormat,_dataType,_packing)*_t*_r;
|
||||
unsigned int previousTotalSize = 0;
|
||||
|
||||
if (_data) previousTotalSize = computeRowWidthInBytes(_s,_pixelFormat,_dataType,_packing)*_t*_r;
|
||||
|
||||
unsigned int newTotalSize = computeRowWidthInBytes(s,format,type,packing)*t*r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user