mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
autorunManager: Avoid access to non-existent array element
https://bugzilla.gnome.org/show_bug.cgi?id=787907
This commit is contained in:
parent
ecddf1fffd
commit
2d11b5cea0
1 changed files with 5 additions and 1 deletions
|
|
@ -255,7 +255,11 @@ var AutorunDispatcher = new Lang.Class({
|
|||
if (!shouldAutorunMount(mount))
|
||||
return;
|
||||
|
||||
let setting = this._getAutorunSettingForType(contentTypes[0]);
|
||||
let setting;
|
||||
if (contentTypes.length > 0)
|
||||
setting = this._getAutorunSettingForType(contentTypes[0]);
|
||||
else
|
||||
setting = AutorunSetting.ASK;
|
||||
|
||||
// check at the settings for the first content type
|
||||
// to see whether we should ask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue