Hi,

I post it here because there is no GTK+ component in the bugzilla. 

When playing with gtkmm for minisip, I've encountered a crash using
the maemo version of GTK+ which does not occur on upstream GTK+. 

The included test program results in a division by zero. This occurs
when a notebook has no more visible elements. 

In the patch applied to gtknotebook.c, an ideal_tab_width is computed
by dividing the width by the number of visible tabs, which can be zero.

Having

- ideal_tab_width = (total_width / n);
+ ideal_tab_width = n?0:(total_width / n);

or something similar is necessary.

Regards,
-- 
Johan
#include<gtk/gtk.h>


int main( int argc, char ** argv ){
	GtkWidget * nb;
	GtkWidget * w;
	GtkWidget * l;

	gtk_init( &argc, &argv );

	w  = gtk_window_new( GTK_WINDOW_TOPLEVEL );
	nb = gtk_notebook_new();
	l = gtk_label_new( "Hello, World" );

	gtk_container_add( GTK_CONTAINER( nb ), l );
	gtk_container_add( GTK_CONTAINER( w ), nb );

	gtk_widget_show_all( w );
	gtk_widget_hide( l );

	gtk_main();
}
	
	
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to