diff options
author | Yana Stamcheva <yana@jitsi.org> | 2008-05-01 20:02:08 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2008-05-01 20:02:08 +0000 |
commit | 21ce7a42012a626741ce0bc07a4e6869217aca75 (patch) | |
tree | f805a21216eef66077ed4dec85fa6bb6ac04d581 /src/net/java/sip | |
parent | f25080e515fa4f8885994c6e66136cb4a576f721 (diff) | |
download | jitsi-21ce7a42012a626741ce0bc07a4e6869217aca75.zip jitsi-21ce7a42012a626741ce0bc07a4e6869217aca75.tar.gz jitsi-21ce7a42012a626741ce0bc07a4e6869217aca75.tar.bz2 |
Check if the pluginComponent is null before proceeding and firing events
Diffstat (limited to 'src/net/java/sip')
-rw-r--r-- | src/net/java/sip/communicator/impl/gui/UIServiceImpl.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java index 4196516..ac2af5a 100644 --- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java +++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java @@ -862,7 +862,8 @@ public class UIServiceImpl logger .info("Handling registration of a new Plugin Component."); - if(!(pluginComponent.getComponent() instanceof Component)) + if(pluginComponent.getComponent() == null + || !(pluginComponent.getComponent() instanceof Component)) { logger.error("Plugin Component type is not supported." + "Should provide a plugin in AWT, SWT or Swing."); @@ -884,7 +885,7 @@ public class UIServiceImpl * Returns the corresponding <tt>BorderLayout</tt> constraint from the given * <tt>Container</tt> constraint. * - * @param containerConstraint constraints defined in the <tt>Container</tt> + * @param containerConstraints constraints defined in the <tt>Container</tt> * @return the corresponding <tt>BorderLayout</tt> constraint from the given * <tt>Container</tt> constraint. */ @@ -892,6 +893,9 @@ public class UIServiceImpl Object containerConstraints) { Object layoutConstraint = null; + if (containerConstraints == null) + return null; + if (containerConstraints.equals(Container.START)) layoutConstraint = BorderLayout.LINE_START; else if (containerConstraints.equals(Container.END)) |