From 923a0bc0b71a3e480a5335c2a97b3d8dfecb7ef7 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 19 Feb 2012 07:36:01 +0000 Subject: [PATCH] lets not segv shall we? SVN revision: 68119 --- src/bin/e_randr_12.c | 7 ++++--- src/bin/e_randr_12_crtc.c | 2 +- src/bin/e_randr_private.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/e_randr_12.c b/src/bin/e_randr_12.c index f6a50c3ad..e17acd5dd 100644 --- a/src/bin/e_randr_12.c +++ b/src/bin/e_randr_12.c @@ -23,8 +23,8 @@ static Eina_Bool _try_enable_output(E_Randr_Output_Info *output_info, Eina_Bool static Ecore_Poller *poller = NULL; static Eina_List *_event_handlers = NULL; -const static char *_CONNECTION_STATES_STRINGS[] = {"CONNECTED", "DISCONNECTED", "UNKNOWN"}; -const static char *_POLICIES_STRINGS[] = {"ABOVE", "RIGHT", "BELOW", "LEFT", "CLONE", "NONE"}; +static const char *_CONNECTION_STATES_STRINGS[] = {"CONNECTED", "DISCONNECTED", "UNKNOWN"}; +static const char *_POLICIES_STRINGS[] = {"ABOVE", "RIGHT", "BELOW", "LEFT", "CLONE", "NONE"}; //"New" helper functions /** @@ -88,7 +88,8 @@ _structs_init(void) while (--noutputs >= 0) { output_info = _output_info_new(outputs[noutputs]); - e_randr_screen_info.rrvd_info.randr_info_12->outputs = eina_list_append(e_randr_screen_info.rrvd_info.randr_info_12->outputs, output_info); + if (output_info) + e_randr_screen_info.rrvd_info.randr_info_12->outputs = eina_list_append(e_randr_screen_info.rrvd_info.randr_info_12->outputs, output_info); } free(outputs); diff --git a/src/bin/e_randr_12_crtc.c b/src/bin/e_randr_12_crtc.c index 17cec0591..8360271e3 100644 --- a/src/bin/e_randr_12_crtc.c +++ b/src/bin/e_randr_12_crtc.c @@ -193,7 +193,7 @@ _crtc_outputs_mode_max_set(E_Randr_Crtc_Info *crtc_info) * which means that e.g. when a crtc should be placed at a position < 0, all * other crtcs are accordingly moved instead, so the result is the same. */ - const Eina_Bool +Eina_Bool _crtc_move_policy(E_Randr_Crtc_Info *new_crtc) { const E_Randr_Crtc_Info *crtc_rel; diff --git a/src/bin/e_randr_private.h b/src/bin/e_randr_private.h index 3c63d22b0..60cb299d1 100644 --- a/src/bin/e_randr_private.h +++ b/src/bin/e_randr_private.h @@ -61,7 +61,7 @@ E_Randr_Crtc_Info * _crtc_info_new(Ecore_X_Randr_Crtc crtc); void _crtc_info_free(E_Randr_Crtc_Info *crtc_info); void _crtc_refs_set(E_Randr_Crtc_Info *crtc_info); void _crtc_outputs_refs_set(E_Randr_Crtc_Info *crtc_info); -const Eina_Bool _crtc_move_policy(E_Randr_Crtc_Info *new_crtc); +Eina_Bool _crtc_move_policy(E_Randr_Crtc_Info *new_crtc); const E_Randr_Crtc_Info *_crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Policy policy); #endif