57 lines
2.0 KiB
Diff
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
|
||
|
|