mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
monitor-manager: use g_return_val_if_fail if trying to fetch an invalid monitor
https://bugzilla.gnome.org/show_bug.cgi?id=788860
This commit is contained in:
parent
b31e545c9d
commit
f044511037
@ -2345,7 +2345,7 @@ MetaLogicalMonitor *
|
||||
meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
|
||||
int number)
|
||||
{
|
||||
g_assert ((unsigned int) number < g_list_length (manager->logical_monitors));
|
||||
g_return_val_if_fail ((unsigned int) number < g_list_length (manager->logical_monitors), NULL);
|
||||
|
||||
return g_list_nth (manager->logical_monitors, number)->data;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user