Skip to content
Snippets Groups Projects
Commit f8afd8af authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent NPE when view is not initialized

parent 607d8f93
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,8 @@ public class PopupLayout extends RelativeLayout implements ScaleGestureDetector.
@Override
public boolean onTouch(View v, MotionEvent event) {
if (mWindowManager == null)
return false;
if (mScaleGestureDetector != null)
mScaleGestureDetector.onTouchEvent(event);
if (mGestureDetector != null && mGestureDetector.onTouchEvent(event))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment