Remove useless NULL test
commita2cb317f1142a737883659acaee9d0a87e7bb247
authorNicolas Bonifas <nicolas.bonifas@free.fr>
Sun, 6 Dec 2009 01:19:20 +0000 (6 02:19 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 6 Dec 2009 14:32:30 +0000 (6 15:32 +0100)
tree4efa7982f78a884618082fe794fd814b24a9cb1d
parent391d5de79e765cc2970e148ddb82bcca33f5a10b
Remove useless NULL test

If menu is NULL we would have a null pointer dereference when initializing scr.

> Ie, why not move the assignment of 'src' to after the test?

I thought about this, but I checked the 3 different calls to
updateWorkspaceMenu (all in winmenu.c). They must all call
updateWorkspaceMenu with non-NULL pointers, so if we have a NULL
'menu' pointer then we obviously have a major problem and it is
probably better to crash here than to silently return and fail a
little latter.

[crmafra: edit changelog]
src/winmenu.c