[chronojump] Fix possible crash if eventType has no image filename on dialogImageTest
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fix possible crash if eventType has no image filename on dialogImageTest
- Date: Fri, 4 Aug 2017 12:51:38 +0000 (UTC)
commit 1b348ded4ee4ba4bac4b40be1a4585a8f86a323a
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Aug 4 14:48:02 2017 +0200
Fix possible crash if eventType has no image filename on dialogImageTest
src/gui/dialogImageTest.cs | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/dialogImageTest.cs b/src/gui/dialogImageTest.cs
index 11c1ae7..b2f341d 100644
--- a/src/gui/dialogImageTest.cs
+++ b/src/gui/dialogImageTest.cs
@@ -51,8 +51,11 @@ public class DialogImageTest
label_long_description.UseMarkup = true;
}
- Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + myEventType.ImageFileName);
- image_test.Pixbuf = pixbuf;
+ if(myEventType.ImageFileName != null && myEventType.ImageFileName != "")
+ {
+ Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
myEventType.ImageFileName);
+ image_test.Pixbuf = pixbuf;
+ }
}
public enum ArchiveType { FILE, ASSEMBLY }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]