On Thu, 16 Oct 2003, Frank de Lange wrote:
[...] Found the cause. This error is present in the CVS version of Dillo as well, but there it does not matter much (probably why it was not discovered before). In menu.c:Menu_add():
if (callback != NULL) { gtk_signal_connect(GTK_OBJECT(menuitem), "activate", (GtkSignalFunc) Menu_pick_url, data); ^^^^
"data" should be "bw", as Menu_pick_url() needs a BrowserWindow* as second parameter. In CVS Dillo "data" (which is used as user data for callbacks) happens to be always set to "bw", so this bug did not manifest itself. In the patched version, some callbacks expect a DilloDoc* as parameter though... So Menu_pick_url() is called with a DilloDoc* instead of a BrowserWindow*...
The fix is simple:
<PATCH> diff -pruN dillo/src/menu.c dillo_patched/src/menu.c --- dillo/src/menu.c 2003-09-25 15:10:24.000000000 +0200 +++ dillo_patched/src/menu.c 2003-10-16 14:56:38.733763968 +0200 @@ -109,7 +109,7 @@ static GtkWidget * } if (callback != NULL) { gtk_signal_connect(GTK_OBJECT(menuitem), "activate", - (GtkSignalFunc) Menu_pick_url, data); + (GtkSignalFunc) Menu_pick_url, bw); gtk_signal_connect(GTK_OBJECT(menuitem), "activate", (GtkSignalFunc) callback, data); } </PATCH>
Jorge, can you commit this patchlet to CVS?
Done! Cheers Jorge.-