e40717b.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From e40717bcf0d1851465a5d2531b92f6b1da2ce0c0 Mon Sep 17 00:00:00 2001
  2. From: Takashi Iwai <tiwai@suse.de>
  3. Date: Fri, 25 Jun 2021 10:20:18 +0200
  4. Subject: [PATCH] Fix crash at piano widget creation
  5. It was a failure in piano widget that assumed that the widget type is
  6. an integer. It caused a segfault with the recent gtk.
  7. ---
  8. piano.c | 4 ++--
  9. piano.h | 2 +-
  10. 2 files changed, 3 insertions(+), 3 deletions(-)
  11. diff --git a/piano.c b/piano.c
  12. index 7626373..931e3b9 100644
  13. --- a/piano.c
  14. +++ b/piano.c
  15. @@ -69,10 +69,10 @@ static GdkColor c60clr = { red : 18000, green : 0, blue : 54000 };
  16. static GtkWidgetClass *parent_class = NULL;
  17. -guint
  18. +GType
  19. piano_get_type (void)
  20. {
  21. - static guint piano_type = 0;
  22. + static GType piano_type = 0;
  23. if (!piano_type)
  24. {
  25. diff --git a/piano.h b/piano.h
  26. index 6dea3b6..c35d7da 100644
  27. --- a/piano.h
  28. +++ b/piano.h
  29. @@ -71,7 +71,7 @@ struct _PianoClass
  30. };
  31. GtkWidget *piano_new (gboolean * selkeys);
  32. -guint piano_get_type (void);
  33. +GType piano_get_type (void);
  34. void piano_note_on (Piano * piano, guint8 keynum);
  35. void piano_note_off (Piano * piano, guint8 keynum);