plugins: unset draw handler when freeing view

If the view is freed, we definitely shouldn't draw
the view's display anymore.
This commit is contained in:
Ray Strode 2015-09-24 15:53:01 -04:00
parent 29e2763769
commit d33b4ef04e

View 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;