Fix #29475: remove node from properties editor crash on windows. This was a bug
in the UI code, which code access removed data.
Fix OpenCL still being used in a case where Experimental was disabled.
Fix msvc debug warning in md5 code.
if(RNA_enum_get(&cscene, "device") != 0) {
vector<DeviceType> types = Device::available_types();
- DeviceType dtype = (RNA_enum_get(&cscene, "gpu_type") == 0)? DEVICE_CUDA: DEVICE_OPENCL;
+ DeviceType dtype;
+
+ if(!experimental || RNA_enum_get(&cscene, "gpu_type") == 0)
+ dtype = DEVICE_CUDA;
+ else
+ dtype = DEVICE_CUDA;
if(device_type_available(types, dtype))
params.device_type = dtype;
string MD5Hash::get_hex()
{
uint8_t digest[16];
- char buf[16*2];
+ char buf[16*2+1];
finish(digest);
for(int i=0; i<16; i++)
sprintf(buf + i*2, "%02X", digest[i]);
+ buf[sizeof(buf)-1] = '\0';
- return string(buf, sizeof(buf));
+ return string(buf);
}
CCL_NAMESPACE_END
data->state= state;
- if(state != BUTTON_STATE_EXIT) {
+ if(!ELEM(state, BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT)) {
/* When objects for eg. are removed, running ui_check_but()
- * can access the removed data - so disable update on exit */
+ * can access the removed data - so disable update on exit
+ * or highlight */
ui_check_but(but);
}