From: luukkainen Date: Tue, 20 Jan 2009 16:18:57 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8724 ac1ea38d... X-Git-Tag: simantics-1.19.0~20^2~10 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=65c25b6e70526efb03cf3e93e00e31b8c865a604;p=simantics%2F3d.git git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8724 ac1ea38d-2e2b-0410-8846-a27921b304fc --- 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)); + } } }