diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-12-10 13:57:48 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-12-10 13:57:48 +0000 |
commit | 0127b2ca8afc604ac4fa2fc3a9c2f0d4d5469d75 (patch) | |
tree | 236ba24f6fcfce4fe7b38a0d450d85f427510dd3 | |
parent | 87ff57debbf1d51a4edcef180d30375d04ba2a78 (diff) | |
download | rabbitmq-server-0127b2ca8afc604ac4fa2fc3a9c2f0d4d5469d75.tar.gz |
application_controller:get_master/1 can return 'undefined'.
-rw-r--r-- | src/rabbit_vm.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rabbit_vm.erl b/src/rabbit_vm.erl index e9679276..560a9f98 100644 --- a/src/rabbit_vm.erl +++ b/src/rabbit_vm.erl @@ -127,10 +127,12 @@ plugin_memory() -> is_plugin(atom_to_list(App))]). plugin_memory(App) -> - case catch application_master:get_child( - application_controller:get_master(App)) of - {Pid, _} -> sup_memory(Pid); - _ -> 0 + case catch application_controller:get_master(App) of + undefined -> 0; + Master -> case catch application_master:get_child(Master) of + {Pid, _} -> sup_memory(Pid); + _ -> 0 + end end. is_plugin("rabbitmq_" ++ _) -> true; |