there are no items in container.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50539
138bc75d-0d04-0410-961f-
82ee72b054a4
2002-03-10 Tom Tromey <tromey@redhat.com>
+ * java/awt/GridLayout.java (layoutContainer): Handle case where
+ there are no items in container.
+
* java/lang/Win32Process.java: Added comment.
* include/posix.h (_Jv_platform_close_on_exec): New function.
Include fcntl.h.
public void layoutContainer (Container parent)
{
int num = parent.ncomponents;
+
+ // There's no point, and handling this would mean adding special
+ // cases.
+ if (num == 0)
+ return;
+
// This is more efficient than calling getComponents().
Component[] comps = parent.component;