Skip to content

Commit db05b06

Browse files
committed
Fix NPE in drawChild() when returning to Fragment with animation. Appears very similar to Issue umano#599 in umano/AndroidSlidingUpPanel. Put in a check for mSlideableView != null
1 parent a592298 commit db05b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/sothree/slidinguppanel/SlidingUpPanelLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
11541154
boolean result;
11551155
final int save = canvas.save(Canvas.CLIP_SAVE_FLAG);
11561156

1157-
if (mSlideableView != child) { // if main view
1157+
if (mSlideableView != null && mSlideableView != child) { // if main view
11581158
// Clip against the slider; no sense drawing what will immediately be covered,
11591159
// Unless the panel is set to overlay content
11601160
canvas.getClipBounds(mTmpRect);

0 commit comments

Comments
 (0)