Project

General

Profile

Actions

Bug #349

closed

WImage::setResource segfaults on null pointer

Added by Johny Mattsson almost 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
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.

Actions #1

Updated by Koen Deforche almost 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 #2

Updated by Johny Mattsson almost 14 years ago

Thanks Koen!

Actions #3

Updated by Koen Deforche almost 14 years ago

  • Status changed from Resolved to Closed

Fixed in 3.1.3

Actions

Also available in: Atom PDF