projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
c8c7455
)
Commit
83d4a7e3552c184c18baa384487eedf10929cb3a
author
Michel Pollet
<buserror@gmail.com>
Thu, 2 Sep 2010 11:59:59 +0000
(12:59 +0100)
committer
Michel Pollet
<buserror@gmail.com>
Thu, 2 Sep 2010 11:59:59 +0000
(12:59 +0100)
Check the parameters...
Signed-off-by: Michel Pollet <buserror@gmail.com>
simavr/sim/sim_irq.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/sim_irq.c
b/simavr/sim/sim_irq.c
index 54e319b4f69880a195caa63c2ecd1ddb39af8c45..92c2c17b394b509986e12f29a696ad49f147cd3c 100644
(file)
--- a/
simavr/sim/sim_irq.c
+++ b/
simavr/sim/sim_irq.c
@@
-62,6
+62,8
@@
static avr_irq_hook_t * _avr_alloc_irq_hook(avr_irq_t * irq)
void avr_free_irq(avr_irq_t * irq, uint32_t count)
{
+ if (!irq || !count)
+ return;
for (int i = 0; i < count; i++) {
// purge hooks
avr_irq_hook_t *hook = irq->hook;