Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-12-10 21:49:37 +0000
committerChristian W. Damus2015-12-10 21:49:37 +0000
commit3d832f3db477c0ec841ef509dcfa93569e5ec386 (patch)
treed10081de7f77b5ca3c0734c871facd6b8cddac3f /plugins/infra/editor
parenta29d8bc5bff15223f2a74c2ea16e3293a4920a52 (diff)
downloadorg.eclipse.papyrus-3d832f3db477c0ec841ef509dcfa93569e5ec386.tar.gz
org.eclipse.papyrus-3d832f3db477c0ec841ef509dcfa93569e5ec386.tar.xz
org.eclipse.papyrus-3d832f3db477c0ec841ef509dcfa93569e5ec386.zip
Bug 469188: [Editor] Page management improvements in the Papyrus multi-editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469188 Fix exception when the Welcome Page has no content, caused by attempting to allocate an array of a negative number of sash controls.
Diffstat (limited to 'plugins/infra/editor')
-rw-r--r--plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/src/org/eclipse/papyrus/infra/editor/welcome/internal/WelcomeLayout.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/src/org/eclipse/papyrus/infra/editor/welcome/internal/WelcomeLayout.java b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/src/org/eclipse/papyrus/infra/editor/welcome/internal/WelcomeLayout.java
index 59637a416e3..eb5a866cd2d 100644
--- a/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/src/org/eclipse/papyrus/infra/editor/welcome/internal/WelcomeLayout.java
+++ b/plugins/infra/editor/org.eclipse.papyrus.infra.editor.welcome/src/org/eclipse/papyrus/infra/editor/welcome/internal/WelcomeLayout.java
@@ -189,6 +189,10 @@ class WelcomeLayout {
final int columns = (tabs.size() + (tabs.size() % rows)) / rows;
final int lastTab = tabs.size() - 1;
+ if ((rows == 0) || (columns == 0)) {
+ return; // Nothing to present
+ }
+
columnSashes = new Sash[columns - 1]; // Sashes between columns
rowSashes = new Sash[columns][rows - 1]; // Sashes between rows

Back to the top