Turn if check for slice_message around
Turn if check for slice_message around

Instead of executing something if slice_message is not a nullptr, we're just going to return early if it's not a nullptr. This then removes a load of indenting. Also, we only process private_data if it was not a nullptr. That's the only time when the object_lists get modified anyway.

Contributes to issue CURA-4410.

Ultimaker/CuraEngine,Ultimaker/CuraEngine