mirror of
https://github.com/brl/mutter.git
synced 2025-07-07 03:19:51 +00:00
backend/dummy: Warn about missing dummy mode specs
When malformed modes are provided and no valid mode spec is found, mutter will eventually try to access the last element of an empty list. Warn about this and exit properly. https://gitlab.gnome.org/GNOME/mutter/-/issues/1481
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
#include "backends/meta-monitor.h"
|
||||
#include "backends/meta-monitor-config-manager.h"
|
||||
#include "backends/meta-output.h"
|
||||
#include "meta/main.h"
|
||||
#include "meta/util.h"
|
||||
|
||||
#define MAX_MONITORS 5
|
||||
@ -190,6 +191,12 @@ append_monitor (MetaMonitorManager *manager,
|
||||
}
|
||||
}
|
||||
|
||||
if (!mode_specs)
|
||||
{
|
||||
g_warning ("Cannot create dummy output: No valid mode specs.");
|
||||
meta_exit (META_EXIT_ERROR);
|
||||
}
|
||||
|
||||
for (l = mode_specs; l; l = l->next)
|
||||
{
|
||||
CrtcModeSpec *spec = l->data;
|
||||
|
Reference in New Issue
Block a user