From 65c25b6e70526efb03cf3e93e00e31b8c865a604 Mon Sep 17 00:00:00 2001 From: luukkainen Date: Tue, 20 Jan 2009 16:18:57 +0000 Subject: [PATCH] git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8724 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../processeditor/dialogs/LibraryComponentDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java index 63961a98..18263b92 100644 --- a/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java +++ b/org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java @@ -105,8 +105,10 @@ public class LibraryComponentDialog extends Dialog{ public void run() { getShell().setText(title); if (selectedType == null) { - typeList.select(0); - selectedType = (Resource)typeList.getData(typeList.getItem(0)); + if (typeList.getItemCount() > 0) { + typeList.select(0); + selectedType = (Resource)typeList.getData(typeList.getItem(0)); + } } } -- 2.47.1