File: Fix-segfault-due-to-uninitialized-imgui-in-wxwidgets3.2.patch

package info (click to toggle)
slic3r-prusa 2.9.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196,528 kB
  • sloc: cpp: 534,736; ansic: 71,269; yacc: 1,311; makefile: 256; lex: 241; sh: 113
file content (26 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (2)
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
From: Thomas Viehmann <tv@beamnet.de>
Date: Thu, 8 Dec 2022 12:23:15 +0800
Subject: Fix segfault due to uninitialized imgui in wxwidgets3.2

Bug-Debian: https://bugs.debian.org/1022234
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022234#15
Forwarded: no
---
 src/slic3r/GUI/HintNotification.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
index c3edede..7c66351 100644
--- a/src/slic3r/GUI/HintNotification.cpp
+++ b/src/slic3r/GUI/HintNotification.cpp
@@ -567,7 +567,9 @@ void HintDatabase::clear_used()
 
 void NotificationManager::HintNotification::count_spaces()
 {
-	//determine line width 
+	ImGuiWrapper& imgui = *wxGetApp().imgui();
+	imgui.new_frame();
+	//determine line width
 	m_line_height = ImGui::CalcTextSize("A").y;