summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/g3dvl/vl_surface.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-01-19 10:15:04 +0000
committerKeith Whitwell <keithw@vmware.com>2009-01-19 10:15:04 +0000
commitb5db6b039c34117be4e441a2b95abbf97df928c3 (patch)
tree8efb8698304b70f67cc408e8d12b93ae01a13015 /src/gallium/state_trackers/g3dvl/vl_surface.c
parent8f3fac6107460b6d9b011b5c76246468bb16004b (diff)
parent76753e30781e88912c0465642616ab16bbc1b4f3 (diff)
Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
Diffstat (limited to 'src/gallium/state_trackers/g3dvl/vl_surface.c')
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_surface.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_surface.c b/src/gallium/state_trackers/g3dvl/vl_surface.c
index 911469f966..0fa7b25b92 100644
--- a/src/gallium/state_trackers/g3dvl/vl_surface.c
+++ b/src/gallium/state_trackers/g3dvl/vl_surface.c
@@ -51,6 +51,12 @@ int vlCreateSurface
sfc->texture = vlGetPipeScreen(screen)->texture_create(vlGetPipeScreen(screen), &template);
+ if (!sfc->texture)
+ {
+ FREE(sfc);
+ return 1;
+ }
+
*surface = sfc;
return 0;
@@ -63,7 +69,7 @@ int vlDestroySurface
{
assert(surface);
- pipe_texture_release(&surface->texture);
+ pipe_texture_reference(&surface->texture, NULL);
FREE(surface);
return 0;