pitivi-formatter: Do not g_file_test on a NULL pointer
authorThibault Saunier <tsaunier@igalia.com>
Sat, 14 Jul 2018 13:00:51 +0000 (09:00 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Sat, 21 Jul 2018 16:03:28 +0000 (12:03 -0400)
ges/ges-pitivi-formatter.c

index ecd5f42..0acaa76 100644 (file)
@@ -111,7 +111,7 @@ pitivi_can_load_uri (GESFormatter * dummy_instance, const gchar * uri,
   xmlXPathContextPtr xpathCtx;
   gchar *filename = g_filename_from_uri (uri, NULL, NULL);
 
-  if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+  if (!filename || !g_file_test (filename, G_FILE_TEST_EXISTS)) {
     g_free (filename);
     return FALSE;
   }