Skip to content

Commit

Permalink
Fix crash on startup (RFBZ#4863)
Browse files Browse the repository at this point in the history
  • Loading branch information
mooninite committed Apr 23, 2018
1 parent cc71d3d commit 3d144a8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 18 additions & 0 deletions kodi-17.6-array-segfault.patch
@@ -0,0 +1,18 @@
--- a/xbmc/guilib/GUIFontTTFGL.cpp
+++ b/xbmc/guilib/GUIFontTTFGL.cpp
@@ -147,9 +147,12 @@ void CGUIFontTTFGL::LastEnd()
#ifdef HAS_GL
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);

- glColorPointer (4, GL_UNSIGNED_BYTE, sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, r));
- glVertexPointer (3, GL_FLOAT , sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, x));
- glTexCoordPointer(2, GL_FLOAT , sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, u));
+ if (!m_vertex.empty())
+ {
+ glColorPointer (4, GL_UNSIGNED_BYTE, sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, r));
+ glVertexPointer (3, GL_FLOAT , sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, x));
+ glTexCoordPointer(2, GL_FLOAT , sizeof(SVertex), (char*)&m_vertex[0] + offsetof(SVertex, u));
+ }
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
9 changes: 8 additions & 1 deletion kodi.spec
Expand Up @@ -14,7 +14,7 @@

Name: kodi
Version: 17.6
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Media center

License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
Expand Down Expand Up @@ -51,6 +51,9 @@ Patch2: kodi-17a2-libdvd.patch
# FFmpeg 3.5 support
Patch3: kodi-17.6-ffmpeg-3.5.patch

# https://trac.kodi.tv/ticket/17850
Patch4: kodi-17.6-array-segfault.patch

# Optional deps (not in EPEL)
%if 0%{?fedora}
# (libbluray in EPEL 6 is too old.)
Expand Down Expand Up @@ -277,6 +280,7 @@ cp -p %{SOURCE4} tools/depends/target/libdvdcss/libdvdcss-master.tar.gz
%patch2 -p1 -b.libdvd
%endif
%patch3 -p1 -b.ffmpeg-3.5
%patch4 -p1 -b.array-segfault


%build
Expand Down Expand Up @@ -423,6 +427,9 @@ fi


%changelog
* Mon Apr 23 2018 Michael Cronenworth <mike@cchtml.com> - 17.6-8
- Add patch for crash on startup (RFBZ#4863)

* Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 17.6-7
- Rebuilt for new ffmpeg snapshot

Expand Down

0 comments on commit 3d144a8

Please sign in to comment.