mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Irssi::signal_emit() - make sure the parameter is a reference before trying
to unreference it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2291 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
a72f7244ff
commit
cffe29818d
@ -32,8 +32,10 @@ CODE:
|
|||||||
p[n-1] = SvPV(ST(n), PL_na);
|
p[n-1] = SvPV(ST(n), PL_na);
|
||||||
else if (irssi_is_ref_object(ST(n)))
|
else if (irssi_is_ref_object(ST(n)))
|
||||||
p[n-1] = irssi_ref_object(ST(n));
|
p[n-1] = irssi_ref_object(ST(n));
|
||||||
else
|
else if (SvROK(ST(n)))
|
||||||
p[n-1] = (void *) SvIV((SV*)SvRV(ST(n)));
|
p[n-1] = (void *) SvIV((SV*)SvRV(ST(n)));
|
||||||
|
else
|
||||||
|
p[n-1] = NULL;
|
||||||
}
|
}
|
||||||
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
|
signal_emit(signal, items-1, p[0], p[1], p[2], p[3], p[4], p[5]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user