diff --git a/cocos/ui/UIScrollView.cpp b/cocos/ui/UIScrollView.cpp index ef1993621d..0797cb0b98 100644 --- a/cocos/ui/UIScrollView.cpp +++ b/cocos/ui/UIScrollView.cpp @@ -894,7 +894,7 @@ bool ScrollView::scrollChildrenVertical(float touchOffsetX, float touchOffsetY) bool ScrollView::scrollChildrenHorizontal(float touchOffsetX, float touchOffestY) { - bool scrollenabled; + bool scrollenabled = false; float realOffset = touchOffsetX; if (_bounceEnabled) {