Re: NEWS on 1.6.0, crash fix... semi-fix (if you create and quickly delete a window sawfish will segfault)



Timo Korvola said:     (by the date of Sat, 10 Oct 2009 12:15:33 +0300)

> On Friday 09 October 2009 23:05:44 Janek Kozicki wrote:
> > We can see that windows.c:534 calls Fcall_window_hook() with
> > an uninitialised argument.
> 
> It is initialized but w->id may be zero if the window has disappeared 
> and error_handler has been run.  So it is probably good to check it like 
> you did in the patch.
> 
> >   warning: failed to allocate a window
> 
> That is because your patch returns null from add_window instead of w.  
> In this case add_window should probably return w and map_request should 
> check for WINDOW_IS_GONE_P before mapping the window.

I'm returning 0, because 0 is also returned at the end of this
function call. After the end of very first 'if' block. So I thought
that it is consistent - return '0' if there is nothing.

-- 
Janek Kozicki                                                         |


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]