The function is called only if wsmap is not null, and the function is not modifying its value so it won't become null. Removed the checks to keep the code as simple as possible for maintainability.
Signed-off-by: Christophe CURIS <christophe.cu...@free.fr> --- src/wsmap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wsmap.c b/src/wsmap.c index ee667f9..bc7a2ff 100755 --- a/src/wsmap.c +++ b/src/wsmap.c @@ -487,8 +487,6 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array) WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev); - if (!wsmap) - break; modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask; switch (ev.type) { @@ -539,8 +537,7 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array) XUngrabPointer(dpy, CurrentTime); XUngrabKeyboard(dpy, CurrentTime); - if (wsmap) - workspace_map_destroy(wsmap); + workspace_map_destroy(wsmap); } static WWorkspaceMap *init_workspace_map(WScreen *scr, W_WorkspaceMap *wsmap_array) -- 2.1.3 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.