forked from qt-creator/qt-creator
main: Fix nullptr access on Windows
The SharedTools::createApplication changes the last
Options::appArguments element value to 0.
Amends c811b93ece
Change-Id: Ie0d220ab45b25fee65f82410195095fd074cdf39
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (HostOsInfo::isWindowsHost()) {
|
if (HostOsInfo::isWindowsHost()) {
|
||||||
const bool hasStyleOption = Utils::findOrDefault(options.appArguments, [](char *arg) {
|
const bool hasStyleOption = Utils::findOrDefault(options.appArguments, [](char *arg) {
|
||||||
return strcmp(arg, "-style") == 0;
|
return arg && strcmp(arg, "-style") == 0;
|
||||||
});
|
});
|
||||||
if (!hasStyleOption) {
|
if (!hasStyleOption) {
|
||||||
// The Windows 11 default style (Qt 6.7) has major issues, therefore
|
// The Windows 11 default style (Qt 6.7) has major issues, therefore
|
||||||
|
Reference in New Issue
Block a user