Package: newt / 0.52.17-1

python_init_once.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Alastair McKinstry <mckinstry@debian.org>
Description: newtInit() should only be called once
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557960
Forwarded: no
Last-Updated: 2014-06-11

Index: newt-0.52.17/snack.c
===================================================================
--- newt-0.52.17.orig/snack.c
+++ newt-0.52.17/snack.c
@@ -369,10 +369,15 @@ static snackWidget * snackWidgetNew (voi
 }
 
 static PyObject * initScreen(PyObject * s, PyObject * args) {
+    static int init_newt = 1;
     suspend.cb = NULL;
     suspend.data = NULL;
     
     newtInit();
+    if (init_newt) { 
+	newtInit();
+	init_newt = 0;
+    }
     newtCls();
 
     Py_INCREF(Py_None);