softpipe: initialize refcount and winsys
authorJerome Glisse <glisse@freedesktop.org>
Thu, 18 Dec 2008 18:56:45 +0000 (19:56 +0100)
committerJerome Glisse <glisse@freedesktop.org>
Thu, 18 Dec 2008 18:56:45 +0000 (19:56 +0100)
src/gallium/drivers/softpipe/sp_texture.c

index 84a497c351696caab95bca8d3ab62907329bbad1..0cb4b2f03c33ec0c9158bd675b1a199ac580dbad 100644 (file)
@@ -219,6 +219,8 @@ softpipe_get_tex_surface(struct pipe_screen *screen,
    assert(level <= pt->last_level);
 
    ps = CALLOC_STRUCT(pipe_surface);
+   ps->refcount = 1;
+   ps->winsys = ws;
    if (ps) {
       assert(ps->refcount);
       assert(ps->winsys);