1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

PR6880: Don't dereference CallsExternalNode if it's NULL.

llvm-svn: 101897
This commit is contained in:
Benjamin Kramer 2010-04-20 12:16:50 +00:00
parent 9127eadfce
commit b61f85894f

View File

@ -158,9 +158,11 @@ private:
// destroy - Release memory for the call graph
virtual void destroy() {
/// CallsExternalNode is not in the function map, delete it explicitly.
CallsExternalNode->allReferencesDropped();
delete CallsExternalNode;
CallsExternalNode = 0;
if (CallsExternalNode) {
CallsExternalNode->allReferencesDropped();
delete CallsExternalNode;
CallsExternalNode = 0;
}
CallGraph::destroy();
}
};