diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-10-05 20:32:53 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-10-05 20:32:53 +0000 |
commit | 389798d4c2279c25ae52703484d45e7d27fe7c54 (patch) | |
tree | 64d60372118571697faa69146126f43e94b5c170 /sys/dev/fb | |
parent | 14e65b0dbbc574e92ab2adb8555e41c8d481aeaf (diff) | |
download | FreeBSD-src-389798d4c2279c25ae52703484d45e7d27fe7c54.zip FreeBSD-src-389798d4c2279c25ae52703484d45e7d27fe7c54.tar.gz |
Check whether init and term are actually given
Diffstat (limited to 'sys/dev/fb')
-rw-r--r-- | sys/dev/fb/splash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/fb/splash.c b/sys/dev/fb/splash.c index c755570..f32af62 100644 --- a/sys/dev/fb/splash.c +++ b/sys/dev/fb/splash.c @@ -83,7 +83,7 @@ splash_test(splash_decoder_t *decoder) { if (splash_find_data(decoder)) return ENOENT; /* XXX */ - if ((*decoder->init)(splash_adp)) { + if (*decoder->init && (*decoder->init)(splash_adp)) { decoder->data = NULL; decoder->data_size = 0; return ENODEV; /* XXX */ @@ -193,7 +193,7 @@ splash_term(video_adapter_t *adp) if (splash_decoder != NULL) { if (splash_callback != NULL) error = (*splash_callback)(SPLASH_TERM, splash_arg); - if (error == 0) + if (error == 0 && splash_decoder->term) error = (*splash_decoder->term)(adp); if (error == 0) splash_decoder = NULL; |