Cycles: Solve some harmless NULL pointer magic
Was harmless but confused some sanity checks, also kinda makes sense to be more verbose about what's going on there.
This commit is contained in:
@@ -212,11 +212,14 @@ public:
|
||||
{
|
||||
data_size = width * ((height == 0)? 1: height) * ((depth == 0)? 1: depth);
|
||||
data.resize(data_size);
|
||||
data_pointer = (device_ptr)&data[0];
|
||||
data_width = width;
|
||||
data_height = height;
|
||||
data_depth = depth;
|
||||
|
||||
if(data_size == 0) {
|
||||
data_pointer = 0;
|
||||
return NULL;
|
||||
}
|
||||
data_pointer = (device_ptr)&data[0];
|
||||
return &data[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user