GNOME Bugzilla – Bug 530485
meta_window_new shoudl handle the situation when XGetWindowAttributes return 0
Last modified: 2008-04-29 13:37:13 UTC
Please describe the problem: Currently in window.c function meta_window_new, we didn't check the return value of XGetWindowAttributes.Although this is occasionally, but if the XGetWindowAttributes returns a 0 due to certain XError, this will cause Metacity core dump, which is quite severe. I suggest to check the return value of XGetWindowAttributes, and process the situation if it returns a 0 Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 110080 [details] [review] Suggest fix This is a suggest fix
Created attachment 110083 [details] [review] Revised patch add some consideration of meta_error_trap_pop_with_return
That looks a good patch; thanks for catching it. http://svn.gnome.org/viewvc/metacity?rev=3698&view=rev