Actions
Bug #349
closedWImage::setResource segfaults on null pointer
Start date:
05/06/2010
Due date:
% Done:
0%
Estimated time:
Description
The docs for WImage::setResource(WResource *resource) states that:
"This sets resource as the contents for the image, as an alternative to setImageRef(). The resource may be cleared by passing resource = 0."
However, passing said null pointer in to clear the resource unconditionally results in a segfault. There appears to be no workaround to clear the resource in a different way.
Updated by Koen Deforche about 14 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
Hey Johny,
You are right. It seems this wasn't implemented. I fixed this in my development branch, and this will be part of the next release.
A workaround that should work however is using setImageRef("...") to set a new reference for the image to replace the resource.
Regards,
koen
Actions