Commit 33e37b12 authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Resolve possible null pointer dereference

parent c42a72f9
......@@ -334,8 +334,10 @@ prepare_document_open_from_stdin(zathura_t* zathura)
gint handle = g_file_open_tmp("zathura.stdin.XXXXXX", &file, &error);
if (handle == -1)
{
girara_error("Can not create temporary file: %s", error->message);
g_error_free(error);
if (error != NULL) {
girara_error("Can not create temporary file: %s", error->message);
g_error_free(error);
}
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment