mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPE if DialogWrapper shown on before application loaded
This commit is contained in:
@@ -191,10 +191,12 @@ public class FocusTrackback {
|
||||
if (app == null || wrongOS() || myConsumed || isSheduledForRestore()) return;
|
||||
|
||||
Project project = null;
|
||||
DataContext context =
|
||||
myParentWindow == null ? DataManager.getInstance().getDataContext() : DataManager.getInstance().getDataContext(myParentWindow);
|
||||
if (context != null) {
|
||||
project = CommonDataKeys.PROJECT.getData(context);
|
||||
DataManager dataManager = DataManager.getInstance();
|
||||
if (dataManager != null) {
|
||||
DataContext context = myParentWindow == null ? dataManager.getDataContext() : dataManager.getDataContext(myParentWindow);
|
||||
if (context != null) {
|
||||
project = CommonDataKeys.PROJECT.getData(context);
|
||||
}
|
||||
}
|
||||
|
||||
mySheduledForRestore = true;
|
||||
|
||||
Reference in New Issue
Block a user