diff --git a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/utils/DevtoolsUtil.java b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/utils/DevtoolsUtil.java index a8fa329c0af..8217a164977 100644 --- a/renderer/native/android/src/main/java/com/tencent/mtt/hippy/utils/DevtoolsUtil.java +++ b/renderer/native/android/src/main/java/com/tencent/mtt/hippy/utils/DevtoolsUtil.java @@ -180,7 +180,7 @@ public static void removeFrameCallback(@NonNull List params, @NonNull View view, } public static void getScreenShot(@NonNull List params, @NonNull final View view, @NonNull final Promise promise) { - if (params.isEmpty()) { + if (params.isEmpty() || view.getWidth() <= 0 || view.getHeight() <= 0) { return; } NativeRender renderer = NativeRendererManager.getNativeRenderer(view.getContext());