Skip to content

Commit 77db4ee

Browse files
committed
fix(main): Preventing notification to show if the scene doesn't exist
1 parent d6d569d commit 77db4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Notifications/EventsPush.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ void EventsPush::processNextEvent(CCScene* self) {
931931
GDUtils::Events::OnRate(sioToEvent(data)).post();
932932
// Set a callback function that will be called when the event is completed
933933
//layer->setEventCompletedCallback(std::bind(&EventsPush::eventCompletedCallback, this));
934-
self->addChild(layer);
934+
if (layer && self) self->addChild(layer);
935935
}
936936
}
937937

0 commit comments

Comments
 (0)