From fbb32dbeb0d379af8abc39c8d7187fa042f9a970 Mon Sep 17 00:00:00 2001
From: John Sheu <john.sheu@gmail.com>
Date: Sun, 3 Jun 2012 15:27:10 -0700
Subject: [PATCH 4/4] rs_get_display_profile should return NULL on error

---
 src/gtk-helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gtk-helper.c b/src/gtk-helper.c
index db4524c..2e0a023 100644
--- a/src/gtk-helper.c
+++ b/src/gtk-helper.c
@@ -794,7 +794,7 @@ rs_get_display_profile(GtkWidget *widget)
 	CMProfileRef prof = NULL;
 	CMGetProfileByAVID(monitor, &prof);
 	if ( prof==NULL )
-		return;
+		return NULL;
 
 	ProfileTransfer transfer = { NULL, 0 };
 	//The following code does not work on 64bit OSX.  Disable if we are compiling there.
@@ -810,7 +810,7 @@ rs_get_display_profile(GtkWidget *widget)
 	(void)widget;
 	HDC hdc = GetDC(NULL);
 	if (hdc == NULL)
-		return;
+		return NULL;
 
 	DWORD len = 0;
 	GetICMProfile (hdc, &len, NULL);
-- 
1.7.3.4

