patch: Fix for null output segfault

Benjamin Franzke benjaminfranzke at googlemail.com
Tue Aug 2 04:24:45 PDT 2011


Hi,

I know you didnt address that, but with the patch there are situations
were we'd still use an output width multiple times as offset.
If we'd have e.g. 3 connectors where the 2. one is disconnected.
This is due to checking only for a current mode (which every valid output has).

I think it fixes your segfault only because "output" points to list head
(i guess your external connector is the first enumerated by drm),
and ((struct wlsc_output *)list_head)->current is fortunately NULL.

I've attached a patch which adresses both points.

Formal note: Part of wayland(-demos) coding style is to have variable
declaration at block-start, not mixed.

2011/8/1 Matt Peterson <ricochet1k at gmail.com>:
> This fixes a problem for me on a laptop with an external video port that
> doesn't have a monitor plugged into it all the time.
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-compositor-drm-Ignore-disconnected-connectors-width.patch
Type: application/octet-stream
Size: 1383 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20110802/a75bf857/attachment.obj>


More information about the wayland-devel mailing list