Segfault when calling hphpd_break() with no debugger attached

A call to hphpd_break() with no debugger attached, from a command-line run (no request), with debugging enabled (not normally true, but can be true if you use something besides cli.hdf), will segfault every time. Simple fix for a high hit-count crash.
Esse commit está contido em:
Mike Magruder
2013-05-16 10:20:21 -07:00
commit de Sara Golemon
commit 075926978e
+5 -3
Ver Arquivo
@@ -504,9 +504,11 @@ void Debugger::removeProxy(DebuggerProxyPtr proxy) {
DebuggerProxyPtr Debugger::findProxy(const StringData* sandboxId) {
TRACE(2, "Debugger::findProxy\n");
ProxyMap::const_accessor acc;
if (m_proxyMap.find(acc, sandboxId)) {
return acc->second;
if (sandboxId) {
ProxyMap::const_accessor acc;
if (m_proxyMap.find(acc, sandboxId)) {
return acc->second;
}
}
return DebuggerProxyPtr();
}