mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 20:26:11 +08:00
ENH:Avoid null pointer dereference
jira:[STUDIO-12113] Change-Id: I992f2559f01e200697e6c7f105d94a81a445bcfd
This commit is contained in:
parent
95d43cb1aa
commit
849bfff512
@ -1866,6 +1866,11 @@ void SendToPrinterDialog::fetchUrl(boost::weak_ptr<PrinterFileSystem> wfs)
|
||||
DeviceManager *dm = GUI::wxGetApp().getDeviceManager();
|
||||
MachineObject *obj = dm->get_selected_machine();
|
||||
|
||||
if (obj == nullptr) {
|
||||
fs->SetUrl("0");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string dev_ver = obj->get_ota_version();
|
||||
std::string dev_id = obj->dev_id;
|
||||
int remote_proto = obj->get_file_remote();
|
||||
|
Loading…
x
Reference in New Issue
Block a user