Commit c9bc287c authored by nona@chromium.org's avatar nona@chromium.org

Fix crash around Reset function call.

There is timing issue around initialization, if the InputContext is initialized
after InputMethodManager, Reset function will be called with NULL object proxy.
This cause a crash. If the object proxy is not ready, calling Reset is not
necessary. So just doing nothing is fine.

BUG=174248
TEST=None


Review URL: https://chromiumcodereview.appspot.com/12223084

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182147 0039d316-1c4b-4281-b951-d872f2087c98
parent 3e2b860c
......@@ -246,7 +246,9 @@ void IBusControllerImpl::Reset() {
return;
IBusInputContextClient* client
= DBusThreadManager::Get()->GetIBusInputContextClient();
if (client)
// We don't need to call Reset if there is no on-going input context, because
// the input context will be reset at initialization.
if (client && client->IsObjectProxyReady())
client->Reset();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment