ui: Check for !pixmap() before trying to export QR code
Adds null pointer checks as well as prevents the Save/Copy context menu from appearing at all if no image is shown. Fixes issue #4140
This commit is contained in:
@@ -15,6 +15,9 @@ namespace Ui {
|
||||
class ReceiveRequestDialog;
|
||||
}
|
||||
class OptionsModel;
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QMenu;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
/* Label widget for QR code. This image can be dragged, dropped, copied and saved
|
||||
* to disk.
|
||||
@@ -33,6 +36,10 @@ public slots:
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private:
|
||||
QMenu *contextMenu;
|
||||
};
|
||||
|
||||
class ReceiveRequestDialog : public QDialog
|
||||
|
||||
Reference in New Issue
Block a user