From: Christophe CURIS <[email protected]> As pointed by Coverity, the function makes use of a pointer which may be null, so we have to properly check that to ensure application will not crash.
Signed-off-by: Christophe CURIS <[email protected]> --- WINGs/wview.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WINGs/wview.c b/WINGs/wview.c index 1138f36..2066244 100644 --- a/WINGs/wview.c +++ b/WINGs/wview.c @@ -188,6 +188,12 @@ void W_RealizeView(W_View * view) } if (!view->flags.realized) { + + if (view->parent == NULL) { + wwarning("trying to realize widget without parent"); + return; + } + parentWID = view->parent->window; view->window = XCreateWindow(dpy, parentWID, view->pos.x, view->pos.y, view->size.width, view->size.height, 0, -- 2.1.1 -- To unsubscribe, send mail to [email protected].
