[gimp/cage: 35/130] colorxhtml: check validity of source_type
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/cage: 35/130] colorxhtml: check validity of source_type
- Date: Thu, 30 Dec 2010 17:50:55 +0000 (UTC)
commit 2942b4b24a19682ed3f698ee60af0bbcac244e43
Author: Nils Philippsen <nils redhat com>
Date: Tue Nov 9 11:28:30 2010 +0100
colorxhtml: check validity of source_type
plug-ins/pygimp/plug-ins/colorxhtml.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/pygimp/plug-ins/colorxhtml.py b/plug-ins/pygimp/plug-ins/colorxhtml.py
index 74d98bd..d9c329f 100755
--- a/plug-ins/pygimp/plug-ins/colorxhtml.py
+++ b/plug-ins/pygimp/plug-ins/colorxhtml.py
@@ -26,7 +26,7 @@ from gimpfu import *
gettext.install("gimp20-python", gimp.locale_directory, unicode=True)
-(CHARS_SOURCE, CHARS_FILE, CHARS_PARAMETER) = range(3)
+all_source_types = (CHARS_SOURCE, CHARS_FILE, CHARS_PARAMETER) = range(3)
escape_table = {
'&': '&',
@@ -66,6 +66,9 @@ def colorxhtml(img, drawable, filename, raw_filename,
if not drawable.is_rgb or drawable.has_alpha:
return
+ if source_type not in all_source_types:
+ return
+
gimp.tile_cache_ntiles(width / gimp.tile_width() + 1)
html = file(filename, 'w')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]