From 9cb50ed538a64d9a85dd9fc998bbdb4bdc199472 Mon Sep 17 00:00:00 2001 From: Jman012 Date: Tue, 17 Sep 2013 20:19:46 -0700 Subject: [PATCH] Let windows.c actually get the tox *m. main.c called init_windows(m), but windows.c only had init_windows(). This caused m to be NULL, which didn't cause any crashes, but it was certainly a headache for trying to do some new stuff. --- src/windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windows.c b/src/windows.c index f61768b..e25e4da 100644 --- a/src/windows.c +++ b/src/windows.c @@ -195,8 +195,9 @@ void set_active_window(int index) active_window = windows + index; } -ToxWindow *init_windows() +ToxWindow *init_windows(Tox *mToAssign) { + m = mToAssign; int n_prompt = add_window(m, new_prompt()); if (n_prompt == -1 || add_window(m, new_friendlist()) == -1) {