diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-02-25 19:12:11 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-02-25 19:12:11 -0800 |
commit | 7a0469ac3ad4ae33aaa5927603ac71f2896d6c96 (patch) | |
tree | cd2860d14e8a6c66ee024c82b182627898f6ab24 /src/github/daneren2005 | |
parent | d489c27ee0bf46cc8bfd47efaa012ad5f09c6b67 (diff) | |
download | dsub-7a0469ac3ad4ae33aaa5927603ac71f2896d6c96.tar.gz dsub-7a0469ac3ad4ae33aaa5927603ac71f2896d6c96.tar.bz2 dsub-7a0469ac3ad4ae33aaa5927603ac71f2896d6c96.zip |
Fix crash if numColumns is ever -1
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/view/HeaderGridView.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/view/HeaderGridView.java b/src/github/daneren2005/dsub/view/HeaderGridView.java index 350e90ee..913fd28d 100644 --- a/src/github/daneren2005/dsub/view/HeaderGridView.java +++ b/src/github/daneren2005/dsub/view/HeaderGridView.java @@ -36,7 +36,7 @@ import java.util.ArrayList; * See {@link HeaderGridView#addFooterView(View, Object, boolean)} */ public class HeaderGridView extends GridView { - + private static final String TAG = HeaderGridView.class.getSimpleName(); public static boolean DEBUG = false; /** @@ -308,7 +308,7 @@ public class HeaderGridView extends GridView { int numColumns = getNumColumnsCompatible(); // adapter has not been set or has no views in it; - if (adapter == null || adapter.getCount() <= numColumns * (mHeaderViewInfos.size() + mFooterViewInfos.size())) { + if (adapter == null || adapter.getCount() <= numColumns * (mHeaderViewInfos.size() + mFooterViewInfos.size()) || mNumColumns == -1) { return -1; } int mColumnWidth = getColumnWidthCompatible(); |