From be42388bdb7acdc5ddcfa1f9e896af96e5259485 Mon Sep 17 00:00:00 2001 From: Feng Qian Date: Thu, 16 Apr 2009 10:05:38 -0700 Subject: Fix a null pointer exception in DumpRenderTree (issue 1792567) The first test causes NullPointerException in DumpRenderTree because dumpAsText could return a null string. --- .../src/com/android/dumprendertree/TestShellActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java index bf8a3b35a443..404d1012c7dd 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java @@ -165,7 +165,8 @@ public class TestShellActivity extends Activity implements LayoutTestController if (mDialogStrings != null) os.write(mDialogStrings.toString().getBytes()); mDialogStrings = null; - os.write(webkitData.getBytes()); + if (webkitData != null) + os.write(webkitData.getBytes()); os.flush(); os.close(); } catch (IOException ex) { -- cgit v1.2.3-59-g8ed1b