thanks for the bug/patch, two things:
1) the patch seems to be reversed :p
2) what about putting the if statement inside calculate_scale call?
static float
calculate_scale (MetaMonitor     *monitor,
                 MetaMonitorMode *monitor_mode)
{
  int resolution_width, resolution_height;
  int width_mm, height_mm;
  int scale;

  scale = 1.0;
+  if (!monitor_mode)
+   goto out;
  meta_monitor_mode_get_resolution (monitor_mode,


this way the scale will be set to 1.0 in case monitor_mode is NULL.
(I followed the calls,
meta_monitor_calculate_mode_scale -> calculate_scale and this return of 1.0 in 
case of errors seems to be a safer solution, by just looking at the code.)

If Jeremy agrees, and you report he patch upstream, I think we can
upload to artful.

I uploaded the "fix" (my version, I didn't test/check it for buildability) in 
my ppa
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1721718

Title:
  Segmentation fault in meta_monitor_mode_get_resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1721718/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to