From 7035bbb4804d8b75654806259beaec1789f4f958 Mon Sep 17 00:00:00 2001 From: Oleg Krasilnikov Date: Mon, 10 Dec 2007 13:42:10 +0000 Subject: [PATCH] Bug #212284 : Exception when deleting a project including content --- .../settings/model/CProjectDescriptionManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java index 46d022fb17e..ee885b35eb3 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java @@ -473,10 +473,12 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager { ICStorageElement oldEl = des.doGetCachedRootStorageElement(); if(oldEl != null){ InputStream newContents = getSharedProperty(project, STORAGE_FILE_NAME); - ByteArrayOutputStream oldOut = write(oldEl); - InputStream oldContents = new ByteArrayInputStream(oldOut.toByteArray()); - if(streamsMatch(newContents, oldContents)) - return null; + if (newContents != null) { + ByteArrayOutputStream oldOut = write(oldEl); + InputStream oldContents = new ByteArrayInputStream(oldOut.toByteArray()); + if(streamsMatch(newContents, oldContents)) + return null; + } } } catch (CoreException e){ CCorePlugin.log(e);