summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index dc31bb93786..664b78f8d5e 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -187,8 +187,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
This->stride = nine_format_get_stride(This->base.info.format, pDesc->Width);
- if (pDesc->Usage & D3DUSAGE_DYNAMIC)
- pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
+ if (This->base.resource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
+ This->base.resource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
/* TODO: investigate what else exactly needs to be cleared */
if (This->base.resource && (pDesc->Usage & D3DUSAGE_RENDERTARGET)) {