diff options
author | Ray Strode <rstrode@redhat.com> | 2012-10-24 14:50:27 -0400 |
---|---|---|
committer | root <root@halfline-ssd.usersys.redhat.com> | 2012-10-24 14:52:24 -0400 |
commit | 4b7fe818d9d310ae746efb82b5b37b9dae410993 (patch) | |
tree | 149ce7dcba6566af9df32069584bf0ac78ddd2bd | |
parent | a91db63f11527e49bef344027fadb06d73057b19 (diff) |
boot-splash: avoid crash if plugin doesn't support system updates
Right now if the user hits escape a couple of times they'll get
a crash, since the details plugin doesn't support system updates.
This commit makes ply_boot_splash_system_update a no-op in the
event the splash doesn't support that feature.
-rw-r--r-- | src/libply-splash-core/ply-boot-splash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libply-splash-core/ply-boot-splash.c b/src/libply-splash-core/ply-boot-splash.c index d82d610c..93d93450 100644 --- a/src/libply-splash-core/ply-boot-splash.c +++ b/src/libply-splash-core/ply-boot-splash.c @@ -610,13 +610,15 @@ ply_boot_splash_system_update (ply_boot_splash_t *splash, { assert (splash != NULL); assert (splash->module_handle != NULL); assert (splash->loop != NULL); assert (splash->plugin_interface != NULL); assert (splash->plugin != NULL); - assert (splash->plugin_interface->system_update != NULL); + + if (splash->plugin_interface->system_update == NULL) + return false; ply_trace ("updating system %i%%", progress); splash->plugin_interface->system_update (splash->plugin, progress); return true; } |