Fix crash in QPlatformInputContextFactory.

If ic is null we shouldn't dereference it.

Change-Id: Idf472c799f8207d893f15a55fac330ea20ec451c
Reviewed-on: http://codereview.qt-project.org/4639
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Samuel Rødal 2011-09-12 09:52:03 +02:00 committed by Lars Knoll
parent 3889f37dc7
commit 3ade4d260f

View File

@ -84,7 +84,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create()
QString icString = QString::fromLatin1(getenv("QT_IM_MODULE"));
ic = create(icString);
qDebug() << ic << ic->isValid();
if (ic && ic->isValid())
return ic;