Skip to content

Commit 9a0f302

Browse files
committed
revert the layoutComponent codes to prevent the demos crush.
1 parent e596104 commit 9a0f302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,9 @@ namespace cocostudio
836836
void WidgetReader::setLayoutComponentPropsWithFlatBuffers(cocos2d::Node* node, const flatbuffers::Table* nodeOptions)
837837
{
838838
auto layoutComponentTable = ((WidgetOptions*)nodeOptions)->layoutComponent();
839+
if (!layoutComponentTable) return;
839840

840841
auto layoutComponent = ui::LayoutComponent::bindLayoutComponent(node);
841-
if (!layoutComponentTable) return;
842842

843843
bool positionXPercentEnabled = layoutComponentTable->positionXPercentEnabled();
844844
bool positionYPercentEnabled = layoutComponentTable->positionYPercentEnabled();

0 commit comments

Comments
 (0)