Commit f52c1db0 authored by Erik Verbruggen's avatar Erik Verbruggen

Help: fix possible nullptr deref.

Setting QTC_HELPVIEWER_BACKEND to "native" when the native backend is
not compiled in, would result in a nullptr deref.

Change-Id: I5618650e0c4ae1c986a54a46232e8f782e43f350
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 7f2e3fc2
......@@ -566,6 +566,9 @@ HelpViewer *HelpPlugin::createHelpViewer(qreal zoom)
if (backend.compare(QLatin1String("native"), Qt::CaseInsensitive) == 0) {
#ifdef QTC_MAC_NATIVE_HELPVIEWER
viewer = new MacWebKitHelpViewer(zoom);
#else
qWarning() << "native help viewer is requested, but was not enabled during compilation";
viewer = new TextBrowserHelpViewer(zoom);
#endif
} else if (backend.compare(QLatin1String("textbrowser"), Qt::CaseInsensitive) == 0) {
viewer = new TextBrowserHelpViewer(zoom);
......
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