Search
lxdream.org :: lxdream :: r563:72ccfd1f432b
lxdream 0.9.1
released Jun 29
Download Now
changeset563:72ccfd1f432b lxdream-mmu
parent562:e598411b640b
child564:dc7b5ffb0535
authornkeynes
dateTue Jan 01 05:51:04 2008 +0000 (12 years ago)
branchlxdream-mmu
Fix null pointer segfault
src/gtkui/mmio_win.c
1.1 --- a/src/gtkui/mmio_win.c Tue Jan 01 05:48:06 2008 +0000
1.2 +++ b/src/gtkui/mmio_win.c Tue Jan 01 05:51:04 2008 +0000
1.3 @@ -121,8 +121,10 @@
1.4 gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(scroll) );
1.5
1.6 trace_button = GTK_CHECK_BUTTON(gtk_check_button_new_with_label(_("Trace access")));
1.7 - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trace_button),
1.8 - io_rgn->trace_flag ? TRUE : FALSE);
1.9 + if( io_rgn != NULL ) {
1.10 + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trace_button),
1.11 + io_rgn->trace_flag ? TRUE : FALSE);
1.12 + }
1.13 gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(trace_button) );
1.14 gtk_box_set_child_packing( GTK_BOX(vbox), GTK_WIDGET(trace_button),
1.15 FALSE, FALSE, 0, GTK_PACK_START );
.