minor - avoid NPE.

This commit is contained in:
Heng Sin Low 2008-12-05 16:20:18 +00:00
parent ff6b2bff61
commit fb02b1955a
1 changed files with 4 additions and 1 deletions

View File

@ -207,7 +207,10 @@ public class WImageDialog extends Window implements EventListener
// Save info
m_mImage.setName(fileName);
m_mImage.setImageURL(fileName);
m_mImage.setBinaryData(image.getContent().getByteData());
if (image.getContent() != null)
m_mImage.setBinaryData(image.getContent().getByteData());
else
m_mImage.setBinaryData(null);
} // cmd_file
/**