Project: SWT
Bug 266828 getCharCount() in Combo throws NullPointerException
Reported: 2009-03-03 05:42:31 | Status: resolved fixed

The internal method getCharCount in the Combo widget on Mac OS X throws nullpointer if 'NSString str' stays null, which gets its content from view.titleOfSelectedItem() because I believe no item was selected. We experience when call getSelection() on a fresh Combo Widget. getSelection calls getCharCount() and throws a nullpointer. getCharCount should check for null and return 0 in this case I believe.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java