Skip to content

Commit 4b020f8

Browse files
committed
constructor may cause NPE.
1 parent 3dda466 commit 4b020f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/main/java/com/opensource/svgaplayer/SVGAImageView.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ open class SVGAImageView : ImageView {
7979

8080
private var animator: ValueAnimator? = null
8181

82-
constructor(context: Context) : super(context) {}
82+
constructor(context: Context?) : super(context) {}
8383

84-
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
84+
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
8585
attrs?.let { loadAttrs(it) }
8686
}
8787

88-
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
88+
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
8989
attrs?.let { loadAttrs(it) }
9090
}
9191

92-
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
92+
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
9393
attrs?.let { loadAttrs(it) }
9494
}
9595

0 commit comments

Comments
 (0)