[gedit] Avoid crash by expecting correct return value from Gdk.color_parse
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Avoid crash by expecting correct return value from Gdk.color_parse
- Date: Tue, 18 Oct 2011 22:23:51 +0000 (UTC)
commit 6a1c5b0886dd7238b0874ddb7b3c5dac0f92b465
Author: Michael Terry <michael terry canonical com>
Date: Tue Oct 18 13:11:39 2011 -0400
Avoid crash by expecting correct return value from Gdk.color_parse
https://bugzilla.gnome.org/show_bug.cgi?id=662114
plugins/pythonconsole/pythonconsole/config.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/pythonconsole/pythonconsole/config.py b/plugins/pythonconsole/pythonconsole/config.py
index 97e0c5c..7b2e5e4 100644
--- a/plugins/pythonconsole/pythonconsole/config.py
+++ b/plugins/pythonconsole/pythonconsole/config.py
@@ -58,9 +58,9 @@ class PythonConsoleConfigWidget(object):
@staticmethod
def set_colorbutton_color(colorbutton, value):
- parsed, color = Gdk.color_parse(value)
+ color = Gdk.color_parse(value)
- if parsed:
+ if color is not None:
colorbutton.set_color(color)
def on_colorbutton_command_color_set(self, colorbutton):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]