Skip to content

Commit

Permalink
Fix potential NULL pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
manup committed Apr 26, 2016
1 parent dccda17 commit fcfbab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void DeRestPluginPrivate::gpProcessButtonEvent(const deCONZ::GpDataIndication &i
std::vector<RuleAction>::const_iterator aEnd = r->actions().end();
for (; a != aEnd; ++a)
{
Group *group;
Group *group = 0;
TaskItem task;
task.req.setDstEndpoint(0xFF); // broadcast endpoint
task.req.setSrcEndpoint(getSrcEndpoint(0, task.req));
Expand Down Expand Up @@ -598,7 +598,7 @@ void DeRestPluginPrivate::gpProcessButtonEvent(const deCONZ::GpDataIndication &i

for (; l != lend; ++l)
{
if (groupId == "0" || isLightNodeInGroup(&(*l),group->address()))
if (groupId == "0" || (group && isLightNodeInGroup(&(*l), group->address())))
{
l->setIsOn(false);
updateEtag(l->etag);
Expand Down

0 comments on commit fcfbab1

Please sign in to comment.