summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-12-10 14:51:40 +0000
committerSimon MacMullen <simon@rabbitmq.com>2012-12-10 14:51:40 +0000
commit9377b5623f1e8fff956b204112982d0ae0aedb25 (patch)
tree6bd956400fdf4c4b11b96d73b1e3f3efcf911348
parent0127b2ca8afc604ac4fa2fc3a9c2f0d4d5469d75 (diff)
downloadrabbitmq-server-9377b5623f1e8fff956b204112982d0ae0aedb25.tar.gz
Call application_master:get_child/1 more like OTP does.
-rw-r--r--src/rabbit_vm.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_vm.erl b/src/rabbit_vm.erl
index 560a9f98..62feca79 100644
--- a/src/rabbit_vm.erl
+++ b/src/rabbit_vm.erl
@@ -130,8 +130,9 @@ plugin_memory(App) ->
case catch application_controller:get_master(App) of
undefined -> 0;
Master -> case catch application_master:get_child(Master) of
- {Pid, _} -> sup_memory(Pid);
- _ -> 0
+ {Pid, _} when is_pid(Pid) -> sup_memory(Pid);
+ Pid when is_pid(Pid) -> sup_memory(Pid);
+ _ -> 0
end
end.