Jan Zerebecki wrote:
CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP) * may have child window IDs instead of window name */
if (HIWORD(cs->lpszName))
if (cs && HIWORD(cs->lpszName))
cs is never NULL at that point.
Felix
On Thu, Mar 08, 2007 at 05:08:46PM +0100, Felix Nawothnig wrote:
Jan Zerebecki wrote:
CREATESTRUCTA *cs = (CREATESTRUCTA *)lParam; /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP) * may have child window IDs instead of window name */
if (HIWORD(cs->lpszName))
if (cs && HIWORD(cs->lpszName))
cs is never NULL at that point.
Where should it be checked for NULL, then? Or what does it prevent to be NULL?
Jan
PS: please respect Mail-Followup-To, see http://cr.yp.to/proto/replyto.html
On Fri, Mar 09, 2007 at 03:53:17PM +0100, Felix Nawothnig wrote:
Jan Zerebecki wrote:
cs is never NULL at that point.
Where should it be checked for NULL, then? Or what does it prevent to be NULL?
cs == lParam. And this code is inside if (lParam != NULL).
Sorry, I missed that, because it was only recently added.
Jan