(SoftFilters) Add some more safety checks before executing certain function pointers

This commit is contained in:
twinaphex 2014-04-29 00:36:52 +02:00
parent 931d54df1d
commit d0a8fdc0bc

View File

@ -320,6 +320,7 @@ void rarch_softfilter_get_output_size(rarch_softfilter_t *filt,
unsigned *out_width, unsigned *out_height,
unsigned width, unsigned height)
{
if (filt && filt->impl && filt->impl->query_output_size)
filt->impl->query_output_size(filt->impl_data, out_width, out_height, width, height);
}
@ -333,6 +334,8 @@ void rarch_softfilter_process(rarch_softfilter_t *filt,
const void *input, unsigned width, unsigned height, size_t input_stride)
{
unsigned i;
if (filt && filt->impl && filt->impl->get_work_packets)
filt->impl->get_work_packets(filt->impl_data, filt->packets,
output, output_stride, input, width, height, input_stride);