flacjacket / pywlroots

Python binding to the wlroots library using cffi
University of Illinois/NCSA Open Source License
51 stars 12 forks source link

Renderer: autocreate() checks for a truth value not for ffi.NULL #195

Closed heuer closed 4 months ago

heuer commented 4 months ago
    def autocreate(backend: Backend) -> Renderer:
        """Creates a suitable renderer for a backend."""
        ret = lib.wlr_renderer_autocreate(backend._ptr)
        if not ret:
            raise RuntimeError("Unable to create a renderer.")

should be:

        […]
        if ret == ffi.NULL:
        […]