Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
index 40661f1caf9c7d53fcc92e2032619dec8ccb6767..dd5d22bbef217f6d7be4dac10591f4731982901d 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
@@ -1456,8 +1456,10 @@ public class ContentViewCore |
TraceEvent.begin(); |
if (newConfig.keyboard != Configuration.KEYBOARD_NOKEYS) { |
- mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore), |
- ImeAdapter.getTextInputTypeNone()); |
+ if (mNativeContentViewCore != 0) { |
+ mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore), |
+ ImeAdapter.getTextInputTypeNone()); |
+ } |
mInputMethodManagerWrapper.restartInput(mContainerView); |
} |
mContainerViewInternals.super_onConfigurationChanged(newConfig); |
@@ -1641,6 +1643,8 @@ public class ContentViewCore |
if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { |
switch (event.getAction()) { |
case MotionEvent.ACTION_SCROLL: |
+ if (mNativeContentViewCore == 0) return false; |
+ |
nativeSendMouseWheelEvent(mNativeContentViewCore, event.getEventTime(), |
event.getX(), event.getY(), |
event.getAxisValue(MotionEvent.AXIS_VSCROLL)); |
@@ -2116,7 +2120,7 @@ public class ContentViewCore |
} |
public void clearSslPreferences() { |
- nativeClearSslPreferences(mNativeContentViewCore); |
+ if (mNativeContentViewCore != 0) nativeClearSslPreferences(mNativeContentViewCore); |
} |
private boolean isSelectionHandleShowing() { |