[Libreoffice-commits] .: vcl/unx

Michael Meeks michael at kemper.freedesktop.org
Mon Oct 31 07:15:49 PDT 2011


 vcl/unx/gtk/app/gtksys.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8278a72b36adfd7f0a44dbedc558961dfd0dd24
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Mon Oct 31 14:15:02 2011 +0000

    gtk: tolerate NULL from gdk_screen_get_monitor_plug_name

diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index b752cce..dbe1c47 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -118,7 +118,7 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen)
     for (int i = 0; i < max && ret < 0; i++)
     {
         char *name = gdk_screen_get_monitor_plug_name (pScreen, i);
-        if (!g_ascii_strncasecmp (name, "LVDS", 4))
+        if (name && !g_ascii_strncasecmp (name, "LVDS", 4))
             ret = i;
         g_free (name);
     }


More information about the Libreoffice-commits mailing list