Index: libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java |
diff --git a/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java b/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java |
index afddda79172c8f3778c2155412c9b157552fb10d..44e6184c79ece049e6848ac1f57e96afeca6e92a 100644 |
--- a/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java |
+++ b/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java |
@@ -1154,9 +1154,12 @@ public class AdblockWebView extends WebView |
if (url != null) |
{ |
elemHideLatch = new CountDownLatch(1); |
- elemHideThread = new ElemHideThread(elemHideLatch); |
- elemHideThread.setFinishedRunnable(elemHideThreadFinishedRunnable); |
- elemHideThread.start(); |
+ synchronized (elemHideThreadLockObject) |
+ { |
+ elemHideThread = new ElemHideThread(elemHideLatch); |
+ elemHideThread.setFinishedRunnable(elemHideThreadFinishedRunnable); |
+ elemHideThread.start(); |
+ } |
} |
else |
{ |