network: Avoid setting a GError if already set
If the wireless security is invalid, don't try to set the GError if the ad-hoc mode is invalid as well. https://bugzilla.gnome.org/show_bug.cgi?id=769230
This commit is contained in:
parent
b0329f8ef6
commit
2a6706fe4c
1 changed files with 2 additions and 1 deletions
|
@ -399,7 +399,8 @@ validate (CEPage *page,
|
|||
|
||||
if (CE_PAGE_SECURITY (page)->adhoc) {
|
||||
if (!wireless_security_adhoc_compatible (sec)) {
|
||||
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, "Security not compatible with Ad-Hoc mode");
|
||||
if (valid)
|
||||
g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_INVALID_SETTING, "Security not compatible with Ad-Hoc mode");
|
||||
valid = FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue