]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/3d/branches/dev@8724 ac1ea38d...
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 20 Jan 2009 16:18:57 +0000 (16:18 +0000)
committerluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 20 Jan 2009 16:18:57 +0000 (16:18 +0000)
org.simantics.proconf.processeditor/src/org/simantics/processeditor/dialogs/LibraryComponentDialog.java

index 63961a9881902f3bc68c0d0067a7c9ace263ff1c..18263b92ffb5fe001d0229e80fb54f82e4602770 100644 (file)
@@ -105,8 +105,10 @@ public class LibraryComponentDialog extends Dialog{
                                public void run() {\r
                                        getShell().setText(title);\r
                                        if (selectedType == null) {\r
-                               typeList.select(0);\r
-                               selectedType = (Resource)typeList.getData(typeList.getItem(0));\r
+                                               if (typeList.getItemCount() > 0) {\r
+                                                       typeList.select(0);\r
+                                       selectedType = (Resource)typeList.getData(typeList.getItem(0));\r
+                                               }\r
                            }\r
                                }\r
                                \r