~ubuntu-branches/ubuntu/raring/wxwidgets2.8/raring

« back to all changes in this revision

Viewing changes to debian/patches/wxglcanvas-avoid-segv-when-glx-not-available

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-01-07 13:59:25 UTC
  • mfrom: (1.1.9) (5.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20120107135925-2601miy9ullcon9j
Tags: 2.8.12.1-6ubuntu1
* Resync from Debian, changes that were kept:
  - debian/rules: re-enable mediactrl. This allows libwx_gtk2u_media-2.8 to be
    built, as this is required by some applications (LP: #632984)
  - debian/control: Build-dep on libxt-dev for mediactrl.
  - Patches
    + fix-bashism-in-example
* Add conflict on python-wxgtk2.8 (<< 2.8.12.1-6ubuntu1~) to python-wxversion
  to guarantee upgrade ordering when moving from pycentral to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix SEGV when GLX not available.
 
2
 Revised in the light of vadz's comment:
 
3
 http://trac.wxwidgets.org/ticket/13566#comment:1
 
4
Bug-Debian: http://bugs.debian.org/575536
 
5
Forwarded: http://trac.wxwidgets.org/ticket/13566
 
6
Last-Update: 2011-10-18
 
7
 
 
8
diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp
 
9
index 24ab43f..d30935c 100644
 
10
--- a/src/gtk/glcanvas.cpp
 
11
+++ b/src/gtk/glcanvas.cpp
 
12
@@ -327,6 +327,8 @@ bool wxGLCanvas::Create( wxWindow *parent,
 
13
             m_canFreeFBC = true;
 
14
         }
 
15
         m_fbc = fbc;  // save for later use
 
16
+        if (!m_fbc)
 
17
+            wxWindow::Create(parent, id, pos, size, style, name);
 
18
         wxCHECK_MSG( m_fbc, false, _T("required FBConfig couldn't be found") );
 
19
     }
 
20
 
 
21
@@ -350,6 +352,8 @@ bool wxGLCanvas::Create( wxWindow *parent,
 
22
 
 
23
     m_vi = vi;  // save for later use
 
24
 
 
25
+    if (!m_vi)
 
26
+        wxWindow::Create(parent, id, pos, size, style, name);
 
27
     wxCHECK_MSG( m_vi, false, _T("required visual couldn't be found") );
 
28
 
 
29
     // watch for the "parent-set" signal on m_wxwindow so we can set colormap