better fix for NPE
authordadubrow
Tue, 03 Aug 2010 13:32:44 -0500
changeset 1753 b0ec278f91fa
parent 1752 34e87e5741a1
child 1754 a1e1c11d5a44
better fix for NPE
core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java	Tue Aug 03 11:50:53 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java	Tue Aug 03 13:32:44 2010 -0500
@@ -104,6 +104,7 @@
 	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
 	 */
 	public void init(IWorkbench workbench) {
+		sdkMgr = SDKCorePlugin.getSDKManager();
 		if (sdkMgr != null)
 			sdkList = sdkMgr.getSDKList();
 	}
@@ -114,7 +115,6 @@
 	public void createControl(Composite parent) {
 		
 		IPreferenceStore prefsStore = SDKUIPlugin.getDefault().getPreferenceStore();
-		sdkMgr = SDKCorePlugin.getSDKManager();
 		if (sdkMgr == null){
 			return; 
 		}