diff options
author | corvid <corvid@lavabit.com> | 2010-02-17 22:45:31 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-02-17 22:45:31 +0000 |
commit | 63f50abc486fa562c947bac2073173ec246dbfad (patch) | |
tree | 0e5a3d16142b3b5c33fac8e5ec24028f5fa69146 | |
parent | 9ec7bf0cf9413566ebb50fd5a3d388cbfaaaa013 (diff) |
Fix segfault when closing window from WM.
I had thought it was a timing problem, but Johannes saw that there
was a problem when the first tab in the window had already been
closed earlier.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/uicmd.cc | 5 |
2 files changed, 3 insertions, 3 deletions
@@ -8,6 +8,7 @@ dillo-2.2.1 [not released yet] +- Include Accept header in HTTP queries. - Don't use obsolete png_check_sig(). - Handle zero-width space. + - Fix segfault closing window from WM. Patches: corvid ----------------------------------------------------------------------------- diff --git a/src/uicmd.cc b/src/uicmd.cc index b57e456f..bc0eb47c 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -357,10 +357,9 @@ public: //---------------------------------------------------------------------------- static void win_cb (fltk::Widget *w, void *cb_data) { - CustTabGroup *tabs; int choice = 0; + CustTabGroup *tabs = (CustTabGroup*) cb_data; - tabs = BW2UI((BrowserWindow*) cb_data)->tabs(); if (tabs->children () > 1) choice = a_Dialog_choice3 ("Window contains more than one tab.", "Close all tabs", "Cancel", NULL); @@ -470,7 +469,7 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh, // Copy the layout pointer into the bw data new_bw->render_layout = (void*)layout; - win->callback(win_cb, new_bw); + win->callback(win_cb, DilloTabs); new_ui->focus_location(); |