st/nine: Fix possible segfault in surface ctor
authorAxel Davy <axel.davy@ens.fr>
Wed, 12 Oct 2016 17:10:53 +0000 (19:10 +0200)
committerAxel Davy <axel.davy@ens.fr>
Thu, 13 Oct 2016 19:16:35 +0000 (21:16 +0200)
commit0717cd975d85eb04389d84c54b796863aa537cf0
tree8c78368f226e95dcc4c09ef0f23d5355ecc220d1
parent98b8ad61c6bc531646bec1e773b0f57f99e47159
st/nine: Fix possible segfault in surface ctor

Regression introduced by
ba0274c7d6c3b77a36bbe1b444f427b0c873e2f3

Check the resource exists before assigning it
a flag (and use This->base.resource instead
of pResource, since the former may have a newly
allocate resource, while the latter would be
NULL).

This should reintroduce the behaviour of previous
code.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/surface9.c