Skip to content

Commit 594bc63

Browse files
committed
Merge pull request bauerca#83 from scompt/child_reuse_crash
Only remove oldChild if it's not null
2 parents 545a22a + cf5115a commit 594bc63

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)