Mike Emmel wrote:
Here is a patch to list.h the reason I have is that for input only
windows that have no surfaces it no one ever registers to recieve
events so there is no queue. I did not check it in since its a change
to the core. I think in general its harmless and seems to be the right
thing.
I think it should be the opposite, having a "D_ASSERT( *list != NULL )",
because trying to remove an element from an empty list indicates bad code.
But I'm wondering why this happens in this case.
Index: list.h
===================================================================
RCS file: /cvs/directfb/DirectFB/lib/direct/list.h,v
retrieving revision 1.6
diff -u -r1.6 list.h
--- list.h 18 Aug 2005 11:13:43 -0000 1.6
+++ list.h 20 Nov 2005 22:35:19 -0000
@@ -124,6 +124,8 @@
static inline void
direct_list_remove( DirectLink **list, DirectLink *link )
{
+ if( *list == NULL)
+ return;
DirectLink *next;
DirectLink *prev;
And here is the trace the window is input only
#0 0x0013121f in direct_list_remove (list=0x8e30c80, link=0x8e30de4)
at ../../lib/direct/list.h:144
#1 0x001313e5 in fusion_reactor_dispatch (reactor=0x8e30c80,
msg_data=0xbfbcd574, self=true, globals=0xf6a31c) at reactor.c:949
#2 0x00f62847 in dfb_window_dispatch (object=0x8e30b80, message=0xbfbcd574,
globals=0xf6a31c) at ../../src/core/windows.h:101
#3 0x00f62818 in dfb_window_post_event (window=0x8e30b80, event=0xbfbcd574)
at windows.c:1111
#4 0x00f61c63 in dfb_window_destroy (window=0x8e30b80) at windows.c:534
#5 0x00f2a33f in IDirectFBWindow_Destroy (thiz=0x8e30d28)
at idirectfbwindow.c:777
#6 0x0017f74c in _gdk_windowing_window_destroy (window=0x8e8e278,
recursing=0, foreign_destroy=0) at gdkwindow-directfb.c:526
#7 0x001725b1 in _gdk_window_destroy_hierarchy (window=0x8e8e278,
recursing=0, foreign_destroy=0) at gdkwindow.c:420
#8 0x001726b7 in IA__gdk_window_destroy (window=0x8e8e278) at gdkwindow.c:469
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev