summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_surface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_surface.c b/src/gallium/state_trackers/g3dvl/vl_surface.c
index 911469f966a..612438f2ac3 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;