mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Prevent potential crash when opening theme editor dialog. (#2359)
This commit is contained in:
parent
7c9c7e6fe4
commit
45daf2d1d5
@ -31,7 +31,9 @@ ColorThemeEditDialog::ColorThemeEditDialog(QWidget *parent) :
|
||||
previewDisasmWidget->setPreviewMode(true);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
// default size limit is acceptable
|
||||
previewDisasmWidget->setMinimumSize(qApp->screenAt(previewDisasmWidget->pos())->size() * 0.5);
|
||||
if (auto screen = qApp->screenAt(previewDisasmWidget->pos())) {
|
||||
previewDisasmWidget->setMinimumSize(screen->size() * 0.5);
|
||||
}
|
||||
#endif
|
||||
previewDisasmWidget->setWindowTitle(tr("Disassembly Preview"));
|
||||
previewDisasmWidget->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
|
Loading…
Reference in New Issue
Block a user