Skip to content

Fix crash with layer styles due to missing md5 sum

Eoin O'Neill requested to merge (removed):layer_style_crash into master

CCBUG:438754

@tymond I noticed this crash when trying to load a test project on my system where the md5() function was causing an assert. It seems like the PSD Layer Style wants to simply override the md5 sum with its own UUID stored as an MD5 hash, though I want to verify if this is correct before pushing it upstream.

Also, out of curiosity, I noticed that we're using const_casts for resolving our missing md5 within the md5 method. It seems like the original design of this function (check for missing md5 before attempting to override) is the correct behavior, but cannot be achieved since the md5() method is no longer truly const. Couldn't we resolve this by returning a handle which can be manually resolved by some clients of the KoResource api?

Edited by Eoin O'Neill

Merge request reports