mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: Fix invalid cast to ClientHandlerStd (see #3499)
This commit is contained in:
@@ -11,4 +11,14 @@ ClientHandlerStd::ClientHandlerStd(Delegate* delegate,
|
||||
const std::string& startup_url)
|
||||
: ClientHandler(delegate, /*is_osr=*/false, with_controls, startup_url) {}
|
||||
|
||||
// static
|
||||
CefRefPtr<ClientHandlerStd> ClientHandlerStd::GetForClient(
|
||||
CefRefPtr<CefClient> client) {
|
||||
auto base = BaseClientHandler::GetForClient(client);
|
||||
if (base && base->GetTypeKey() == &kTypeKey) {
|
||||
return static_cast<ClientHandlerStd*>(base.get());
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace client
|
||||
|
Reference in New Issue
Block a user