The parameter passed to BInputServerMethod:SetIcon() can be NULL. Patch
by Anthony Lee. Thank you! Fixes bug #1686. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23202 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -159,7 +159,10 @@ _BMethodAddOn_::_BMethodAddOn_(BInputServerMethod *method, const char *name,
|
||||
fMenu(NULL)
|
||||
{
|
||||
fName = strdup(name);
|
||||
memcpy(fIcon, icon, 16*16*1);
|
||||
if (icon != NULL)
|
||||
memcpy(fIcon, icon, 16*16*1);
|
||||
else
|
||||
memset(fIcon, 0x1d, 16*16*1);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +196,11 @@ status_t
|
||||
_BMethodAddOn_::SetIcon(const uchar* icon)
|
||||
{
|
||||
CALLED();
|
||||
memcpy(fIcon, icon, 16*16*1);
|
||||
|
||||
if (icon != NULL)
|
||||
memcpy(fIcon, icon, 16*16*1);
|
||||
else
|
||||
memset(fIcon, 0x1d, 16*16*1);
|
||||
|
||||
BMessage msg(IS_UPDATE_ICON);
|
||||
msg.AddInt32("cookie", (uint32)fMethod);
|
||||
|
||||
Reference in New Issue
Block a user