[gedit-code-assistance] Fix crash in gca_diagnostic_message_reposition
- From: Elad Alfassa <eladalfassa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-code-assistance] Fix crash in gca_diagnostic_message_reposition
- Date: Fri, 5 Sep 2014 14:46:42 +0000 (UTC)
commit 1459da0dbba48b7ae395dfb7e6213061a0b2c5ff
Author: Elad Alfassa <elad fedoraproject org>
Date: Fri Sep 5 15:41:56 2014 +0300
Fix crash in gca_diagnostic_message_reposition
gtk_event_box_get_preferred_width expects to get a pointer to an int,
giving it null instead causes a segfault.
Also, rename variable name to match the way they are named in gtk.
src/gca-diagnostic-message.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gca-diagnostic-message.vala b/src/gca-diagnostic-message.vala
index 15aaefb..82a4bf0 100644
--- a/src/gca-diagnostic-message.vala
+++ b/src/gca-diagnostic-message.vala
@@ -347,12 +347,13 @@ class DiagnosticMessage : EventBox
d_view.add_child_in_window(this, TextWindowType.TEXT, 0, 0);
}
+ int natwidth;
int minwidth;
- base.get_preferred_width(null, out minwidth);
+ base.get_preferred_width(out minwidth, out natwidth);
- if (minwidth < width)
+ if (natwidth < width)
{
- width = minwidth;
+ width = natwidth;
}
int natural_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]