plymouth/0001-splash-do-not-process-display-lists-if-it-is-empty.patch
Stephan Kulow b250e6e261 Accepting request 238657 from home:fcrozat:branches:Base:System
- Add
  0001-splash-do-not-process-display-lists-if-it-is-empty.patch:
  fix crash when calling plymouth quit
- Add 0001-seats-guard-against-NULL-terminal.patch: guard against
  NULL terminal.
- Update stop-graphical.patch: add RemainAfterExit=true to
  plymouth-start.service, ensuring plymouthd is not restarted when
  switching between runlevels.

OBS-URL: https://build.opensuse.org/request/show/238657
OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=147
2014-06-25 20:44:01 +00:00

57 lines
2.0 KiB
Diff

From 95b775ea543489c688595e94a96909402b2b56f1 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 20 Jun 2014 16:01:12 +0200
Subject: [PATCH] splash: do not process display lists if it is empty or NULL
---
src/plugins/splash/script/plugin.c | 1 +
src/plugins/splash/script/script-lib-sprite.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/src/plugins/splash/script/plugin.c b/src/plugins/splash/script/plugin.c
index 8e37b37..cd9e052 100644
--- a/src/plugins/splash/script/plugin.c
+++ b/src/plugins/splash/script/plugin.c
@@ -334,6 +334,7 @@ stop_script_animation (ply_boot_splash_plugin_t *plugin)
script_state_destroy (plugin->script_state);
script_lib_sprite_destroy (plugin->script_sprite_lib);
+ plugin->script_sprite_lib = NULL;
script_lib_image_destroy (plugin->script_image_lib);
script_lib_plymouth_destroy (plugin->script_plymouth_lib);
script_lib_math_destroy (plugin->script_math_lib);
diff --git a/src/plugins/splash/script/script-lib-sprite.c b/src/plugins/splash/script/script-lib-sprite.c
index 166c7e7..f1cd57f 100644
--- a/src/plugins/splash/script/script-lib-sprite.c
+++ b/src/plugins/splash/script/script-lib-sprite.c
@@ -704,6 +704,9 @@ void script_lib_sprite_pixel_display_removed (script_lib_sprite_data_t *data, pl
ply_list_node_t *next_node;
script_lib_display_t* display;
+ if (!data)
+ return;
+
node = ply_list_get_first_node (data->displays);
while (node)
{
@@ -725,6 +728,9 @@ script_lib_sprite_refresh (script_lib_sprite_data_t *data)
ply_region_t *region = ply_region_new ();
ply_list_t *rectable_list;
+ if (!data)
+ return;
+
ply_list_sort_stable (data->sprite_list, &sprite_compare_z);
node = ply_list_get_first_node (data->sprite_list);
@@ -848,5 +854,6 @@ void script_lib_sprite_destroy (script_lib_sprite_data_t *data)
script_parse_op_free (data->script_main_op);
script_obj_native_class_destroy (data->class);
free (data);
+ data = NULL;
}
--
1.8.4.5