Skip to content

Commit cf5115a

Browse files
author
Edward Dale
committed
Only remove oldChild if it's not null
1 parent 545a22a commit cf5115a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

library/src/com/mobeta/android/dslv/DragSortListView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,9 @@ public View getView(int position, View convertView, ViewGroup parent) {
720720
if (child != oldChild) {
721721
// shouldn't get here if user is reusing convertViews
722722
// properly
723-
v.removeViewAt(0);
723+
if (oldChild != null) {
724+
v.removeViewAt(0);
725+
}
724726
v.addView(child);
725727
}
726728
} else {

0 commit comments

Comments
 (0)