unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: 56095@debbugs.gnu.org
Subject: bug#56095: Patch
Date: Sun, 19 Jun 2022 19:32:01 +0200	[thread overview]
Message-ID: <44ad86f5-cafd-42a1-840f-3b52580baf93@Spark> (raw)
In-Reply-To: <27290ad8-4f51-41e5-9317-46e4b3c5dd6c@Spark>


[-- Attachment #1.1: Type: text/plain, Size: 185 bytes --]

I'm now using the patch attached.

Why the window pointer  is needed in EmacsScroller at all escapes me, ATM. Someone who knows nsterm.c should probably check if it is needed.



[-- Attachment #1.2: Type: text/html, Size: 404 bytes --]

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 861 bytes --]

diff --git a/src/nsterm.m b/src/nsterm.m
index 891d52ea3f..514b790b15 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -9869,14 +9869,6 @@ - (void)setFrame: (NSRect)newRect
 - (void)dealloc
 {
   NSTRACE ("[EmacsScroller dealloc]");
-  if (window)
-    {
-      if (horizontal)
-        wset_horizontal_scroll_bar (window, Qnil);
-      else
-        wset_vertical_scroll_bar (window, Qnil);
-    }
-  window = 0;
   [super dealloc];
 }
 
@@ -9909,13 +9901,6 @@ -(bool)judge
       view = (EmacsView *)FRAME_NS_VIEW (frame);
       if (view != nil)
         view->scrollbarsNeedingUpdate++;
-      if (window)
-        {
-          if (horizontal)
-            wset_horizontal_scroll_bar (window, Qnil);
-          else
-            wset_vertical_scroll_bar (window, Qnil);
-        }
       window = 0;
       [self removeFromSuperview];
       [self release];

       reply	other threads:[~2022-06-19 17:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <27290ad8-4f51-41e5-9317-46e4b3c5dd6c@Spark>
2022-06-19 17:32 ` Gerd Möllmann [this message]
2022-06-19 17:42   ` bug#56095: Patch Eli Zaretskii
2022-06-19 18:02     ` Gerd Möllmann
2022-06-19 22:51   ` bug#56095: 29.0.50; nsterm.m, use after free Lars Ingebrigtsen
2022-06-20  1:02   ` bug#56095: Patch Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-20  6:00     ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44ad86f5-cafd-42a1-840f-3b52580baf93@Spark \
    --to=gerd.moellmann@gmail.com \
    --cc=56095@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).