]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
plugins: unset draw handler when freeing view
authorRay Strode <rstrode@redhat.com>
Thu, 24 Sep 2015 19:53:01 +0000 (15:53 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 23 May 2016 14:54:58 +0000 (10:54 -0400)
If the view is freed, we definitely shouldn't draw
the view's display anymore.

src/plugins/splash/fade-throbber/plugin.c

index 1643b870b1636c8b34dbaa463ac9fad4e2e132f1..00410dea83f6ab85c3f9afb1963306dc2b05d9b0 100644 (file)
@@ -264,6 +264,8 @@ view_free (view_t *view)
         ply_label_free (view->message_label);
         free_stars (view);
 
+        ply_pixel_display_set_draw_handler (view->display, NULL, NULL);
+
         free (view);
 }
 
@@ -763,7 +765,6 @@ remove_pixel_display (ply_boot_splash_plugin_t *plugin,
                 next_node = ply_list_get_next_node (plugin->views, node);
 
                 if (view->display == display) {
-                        ply_pixel_display_set_draw_handler (view->display, NULL, NULL);
                         view_free (view);
                         ply_list_remove_node (plugin->views, node);
                         return;