summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-02-27 01:52:46 -0800
committerVinson Lee <[email protected]>2010-02-27 01:52:46 -0800
commit226d98173886e9e26337d6e9593b2b561c8cb758 (patch)
treed1ad2feb89a5ecc32ad45114975606bbd1446d5c /src/mesa/drivers/dri
parent24a8b470ba592b4eb3560f7c5762e17ec0977a51 (diff)
r600: Assert pointer is not null before dereferencing.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 8344dd9a518..834bcc63e31 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -1746,18 +1746,21 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
switch (source_index)
{
case 0:
+ assert(alu_instruction_ptr);
alu_instruction_ptr->m_Word0.f.src0_sel = src_sel;
alu_instruction_ptr->m_Word0.f.src0_rel = src_rel;
alu_instruction_ptr->m_Word0.f.src0_chan = src_chan;
alu_instruction_ptr->m_Word0.f.src0_neg = src_neg;
break;
case 1:
+ assert(alu_instruction_ptr);
alu_instruction_ptr->m_Word0.f.src1_sel = src_sel;
alu_instruction_ptr->m_Word0.f.src1_rel = src_rel;
alu_instruction_ptr->m_Word0.f.src1_chan = src_chan;
alu_instruction_ptr->m_Word0.f.src1_neg = src_neg;
break;
case 2:
+ assert(alu_instruction_ptr);
alu_instruction_ptr->m_Word1_OP3.f.src2_sel = src_sel;
alu_instruction_ptr->m_Word1_OP3.f.src2_rel = src_rel;
alu_instruction_ptr->m_Word1_OP3.f.src2_chan = src_chan;