psppire-cell-renderer-button: Avoid use-after-free with popup dialog.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 19 Aug 2012 20:18:56 +0000 (13:18 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 19 Aug 2012 20:18:56 +0000 (13:18 -0700)
commit46510f46c169c5d5d1f13bcb2e1ff2aa9fffe05f
tree0038765542dbc1ea97a4a7a113224f13036d0596
parentf481fd69631024bcdc7dc2369bbc1592d7a43ac7
psppire-cell-renderer-button: Avoid use-after-free with popup dialog.

When gtk_button_clicked() on a PsppireCellRendererButton causes a
modal dialog to pop up, psppire_cell_renderer_button_initial_click()
only returns from gtk_button_clicked() after the button has already
been destroyed, which causes the g_object_steal_data() call to
remove the IDLE_ID_STRING to access freed memory.  This commit fixes
the problem by calling g_object_steal_data() before
gtk_button_clicked().
src/ui/gui/psppire-cell-renderer-button.c