summaryrefslogtreecommitdiff
path: root/src
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
commit066471f728bee64f29309c3c261a02e14e557e49 (patch)
tree6bd956400fdf4c4b11b96d73b1e3f3efcf911348 /src
parent97853ffcafcc2e93cfe918a701e5b959402d0b7f (diff)
downloadrabbitmq-server-git-066471f728bee64f29309c3c261a02e14e557e49.tar.gz
Call application_master:get_child/1 more like OTP does.
Diffstat (limited to 'src')
-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 560a9f9800..62feca7906 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.