summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/client/plugin/chromoting_instance.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 6fabb24..7429b4f 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -21,6 +21,7 @@
// crbug.com/74951
#include "content/renderer/p2p/ipc_network_manager.h"
#include "content/renderer/p2p/ipc_socket_factory.h"
+#include "media/base/media.h"
#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/input_event.h"
@@ -121,7 +122,9 @@ ChromotingInstance::~ChromotingInstance() {
// before we can call Detach() on |view_proxy_|.
context_.Stop();
- view_proxy_->Detach();
+ if (view_proxy_.get()) {
+ view_proxy_->Detach();
+ }
}
bool ChromotingInstance::Init(uint32_t argc,
@@ -132,6 +135,13 @@ bool ChromotingInstance::Init(uint32_t argc,
VLOG(1) << "Started ChromotingInstance::Init";
+ // Check to make sure the media library is initialized.
+ // http://crbug.com/91521.
+ if (!media::IsMediaLibraryInitialized()) {
+ LOG(ERROR) << "Media library not initialized.";
+ return false;
+ }
+
// Start all the threads.
context_.Start();