summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2010-02-17 22:45:31 +0000
committercorvid <corvid@lavabit.com>2010-02-17 22:45:31 +0000
commit63f50abc486fa562c947bac2073173ec246dbfad (patch)
tree0e5a3d16142b3b5c33fac8e5ec24028f5fa69146 /src
parent9ec7bf0cf9413566ebb50fd5a3d388cbfaaaa013 (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.
Diffstat (limited to 'src')
-rw-r--r--src/uicmd.cc5
1 files changed, 2 insertions, 3 deletions
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();