From dde61529720dbe45f0b57ff4a8f24206fe96f015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Tue, 1 Jun 2021 19:44:13 +0800 Subject: [PATCH] avoid npe --- doric-Qt/example/doric/shader/DoricViewNode.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doric-Qt/example/doric/shader/DoricViewNode.cpp b/doric-Qt/example/doric/shader/DoricViewNode.cpp index 6182edda..2988c23b 100644 --- a/doric-Qt/example/doric/shader/DoricViewNode.cpp +++ b/doric-Qt/example/doric/shader/DoricViewNode.cpp @@ -239,7 +239,8 @@ DoricViewNode::pureCallJSResponse(QString funcId, QVariantList args) { void DoricViewNode::onClick() { if (clickFunction.isEmpty()) { - mSuperNode->onClick(); + if (mSuperNode != nullptr) + mSuperNode->onClick(); return; } QVariantList args;