Merge pull request #4516 from jriwanek-forks/128kfix
Fix 2 segfaults in DeviceConfig
This commit is contained in:
@@ -120,6 +120,9 @@ DeviceConfig::ProcessConfig(void *dc, const void *c, const bool is_dep)
|
|||||||
int p;
|
int p;
|
||||||
int q;
|
int q;
|
||||||
|
|
||||||
|
if (config == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
while (config->type != -1) {
|
while (config->type != -1) {
|
||||||
const int config_type = config->type & CONFIG_TYPE_MASK;
|
const int config_type = config->type & CONFIG_TYPE_MASK;
|
||||||
|
|
||||||
@@ -363,7 +366,11 @@ DeviceConfig::ConfigureDevice(const _device_ *device, int instance, Settings *se
|
|||||||
dc.ProcessConfig(&device_context, config, false);
|
dc.ProcessConfig(&device_context, config, false);
|
||||||
|
|
||||||
dc.setFixedSize(dc.minimumSizeHint());
|
dc.setFixedSize(dc.minimumSizeHint());
|
||||||
|
|
||||||
if (dc.exec() == QDialog::Accepted) {
|
if (dc.exec() == QDialog::Accepted) {
|
||||||
|
if (config == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
config = device->config;
|
config = device->config;
|
||||||
while (config->type != -1) {
|
while (config->type != -1) {
|
||||||
switch (config->type) {
|
switch (config->type) {
|
||||||
|
Reference in New Issue
Block a user