[arch-commits] Commit in tmux/trunk (PKGBUILD crash-fix.patch)
Sergej Pupykin
spupykin at archlinux.org
Fri Feb 27 12:52:47 UTC 2015
Date: Friday, February 27, 2015 @ 13:52:47
Author: spupykin
Revision: 128355
upgpkg: tmux 1.9_a-2
upd
Added:
tmux/trunk/crash-fix.patch
Modified:
tmux/trunk/PKGBUILD
-----------------+
PKGBUILD | 15 +++++++++++----
crash-fix.patch | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-02-27 12:52:17 UTC (rev 128354)
+++ PKGBUILD 2015-02-27 12:52:47 UTC (rev 128355)
@@ -5,17 +5,24 @@
pkgname=tmux
pkgver=1.9_a
-pkgrel=1
+pkgrel=2
pkgdesc='A terminal multiplexer'
url='http://tmux.sourceforge.net/'
arch=('i686' 'x86_64')
license=('BSD')
-depends=('ncurses' 'libevent')
+depends=('ncurses' 'libevent' 'libutempter')
source=(http://downloads.sourceforge.net/tmux/tmux-${pkgver/_/}.tar.gz
- LICENSE)
+ LICENSE
+ crash-fix.patch)
md5sums=('b07601711f96f1d260b390513b509a2d'
- '71601bc37fa44e4395580b321963018e')
+ '71601bc37fa44e4395580b321963018e'
+ 'd2e0ccb68edaccaf5ffd0e0c21d1776b')
+prepare() {
+ cd "$srcdir/$pkgname-${pkgver/_/}"
+ patch -p1 <$srcdir/crash-fix.patch
+}
+
build() {
cd "$srcdir/$pkgname-${pkgver/_/}"
./configure --prefix=/usr
Added: crash-fix.patch
===================================================================
--- crash-fix.patch (rev 0)
+++ crash-fix.patch 2015-02-27 12:52:47 UTC (rev 128355)
@@ -0,0 +1,38 @@
+commit 78e783e7863eb33981da4a5ad48dd9e2aa2b08dd
+Author: Nicholas Marriott <nicholas.marriott at gmail.com>
+Date: Thu Mar 6 13:01:51 2014 +0000
+
+ Don't segfaut when the parent of the layout cell is NULL, from Thomas Adam.
+
+diff --git a/window.c b/window.c
+index 1dd70c4..9a26b90 100644
+--- a/window.c
++++ b/window.c
+@@ -420,10 +420,15 @@ window_pane_active_set(struct window_pane *wp, struct window_pane *nextwp)
+ void
+ window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp)
+ {
+- struct layout_cell *lc, *lc2;
++ struct layout_cell *lc, *lc2, *lcparent;
++
++ /* Get the parent cell. */
++ lcparent = nextwp->layout_cell->parent;
++ if (lcparent == NULL)
++ return;
+
+ /* Save the target pane in its parent. */
+- nextwp->layout_cell->parent->lastwp = nextwp;
++ lcparent->lastwp = nextwp;
+
+ /*
+ * Save the source pane in all of its parents up to, but not including,
+@@ -432,8 +437,7 @@ window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp)
+ if (wp == NULL)
+ return;
+ for (lc = wp->layout_cell->parent; lc != NULL; lc = lc->parent) {
+- lc2 = nextwp->layout_cell->parent;
+- for (; lc2 != NULL; lc2 = lc2->parent) {
++ for (lc2 = lcparent; lc2 != NULL; lc2 = lc2->parent) {
+ if (lc == lc2)
+ return;
+ }
More information about the arch-commits
mailing list