aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_renderbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast/s_renderbuffer.c')
-rw-r--r--mesalib/src/mesa/swrast/s_renderbuffer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mesalib/src/mesa/swrast/s_renderbuffer.c b/mesalib/src/mesa/swrast/s_renderbuffer.c
index e468bdb16..b1fb57823 100644
--- a/mesalib/src/mesa/swrast/s_renderbuffer.c
+++ b/mesalib/src/mesa/swrast/s_renderbuffer.c
@@ -119,10 +119,8 @@ soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
bpp = _mesa_get_format_bytes(rb->Format);
/* free old buffer storage */
- if (srb->Buffer) {
- free(srb->Buffer);
- srb->Buffer = NULL;
- }
+ free(srb->Buffer);
+ srb->Buffer = NULL;
srb->RowStride = width * bpp;
@@ -170,10 +168,8 @@ soft_renderbuffer_delete(struct gl_renderbuffer *rb)
{
struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
- if (srb->Buffer) {
- free(srb->Buffer);
- srb->Buffer = NULL;
- }
+ free(srb->Buffer);
+ srb->Buffer = NULL;
_mesa_delete_renderbuffer(rb);
}