summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-06-28 15:57:24 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-06-28 15:57:24 +0100
commit65197bc696c4fee4ff11a05c1074284f0b0ea9e6 (patch)
tree449686b7ae6c8931695a355f510f046df8d7b5c7
parent8fb7ce40ecc2f7e7381c327237fbed27dd9546e2 (diff)
downloadrabbitmq-server-65197bc696c4fee4ff11a05c1074284f0b0ea9e6.tar.gz
All keys are optional. We must not omit a vertex just because it has not any dependencies
-rw-r--r--src/rabbit.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index c8a60bd8..b523a26d 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -395,7 +395,13 @@ application_load_order() ->
fun application_graph_vertex/2, fun application_graph_edge/2,
[{App, Deps} ||
{App, _Desc, _Vsn} <- application:loaded_applications(),
- {ok, Deps} <- [application:get_key(App, applications)]]),
+ begin
+ Deps = case application:get_key(App, applications) of
+ undefined -> [];
+ {ok, Lst} -> Lst
+ end,
+ true
+ end]),
true = digraph:del_vertices(
G, digraph:vertices(G) -- digraph_utils:reachable(?APPS, G)),
Result = digraph_utils:topsort(G),