nouveau: make stateobjs start off with refcount of 1
[mesa.git] / src / gallium / drivers / nv40 / nv40_fragtex.c
index 0227d22620d405c840604b845433caec178afc50..eb3002dc05387bfbab4153a6bedcf13e353f9e84 100644 (file)
@@ -151,6 +151,7 @@ nv40_fragtex_validate(struct nv40_context *nv40)
 
                so = nv40_fragtex_build(nv40, unit);
                so_ref(so, &nv40->state.hw[NV40_STATE_FRAGTEX0 + unit]);
+               so_ref(NULL, &so);
                state->dirty |= (1ULL << (NV40_STATE_FRAGTEX0 + unit));
        }