mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-01-02 19:25:31 +00:00
fixed a bug where futurerestore would segfault if device was in recovery mode already
This commit is contained in:
parent
a411052927
commit
1e8ac9c117
|
@ -244,6 +244,18 @@ uint64_t futurerestore::getBasebandGoldCertIDFromDevice(){
|
|||
}
|
||||
|
||||
const char *futurerestore::getDeviceModelNoCopy(){
|
||||
if (!_client->device || !_client->device->product_type){
|
||||
if (check_mode(_client) < 0) {
|
||||
error("ERROR: Unable to discover device mode. Please make sure a device is attached.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (check_hardware_model(_client) == NULL || _client->device == NULL) {
|
||||
error("ERROR: Unable to discover device model\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return _client->device->product_type;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue