Fix a null pointer exception in DumpRenderTree (issue 1792567)

The first test causes NullPointerException in DumpRenderTree because dumpAsText
could return a null string.
This commit is contained in:
Feng Qian
2009-04-16 10:05:38 -07:00
parent 7a430cf152
commit be42388bdb

View File

@@ -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) {