Commit a4c2986d authored by Christoph Feck's avatar Christoph Feck
Browse files

Fix crash if mimeData is null

BUG: 371852
parent 1f35c6d3
......@@ -90,9 +90,11 @@ int main(int argc, char *argv[])
dlg.setCurrentColor(QColor(parser.value(color)));
} else {
const QMimeData* mimeData = QApplication::clipboard()->mimeData(QClipboard::Clipboard);
QColor clipboardColor = mimeData->colorData().value<QColor>();
if (clipboardColor.isValid()) {
dlg.setCurrentColor(clipboardColor);
if (mimeData) {
QColor clipboardColor = mimeData->colorData().value<QColor>();
if (clipboardColor.isValid()) {
dlg.setCurrentColor(clipboardColor);
}
}
}
......
Supports Markdown
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