From e4c43d6bedcd463ad9fdae7a0564b8bbb467ccb7 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Fri, 4 Oct 2013 13:43:45 +0300 Subject: MAINT-3247 FIXED Check that gfilter is not NULL. --- indra/newview/llfilepicker.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 9da8e82c49..16eacc9392 100755 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -939,17 +939,19 @@ void LLFilePicker::chooser_responder(GtkWidget *widget, gint response, gpointer // let's save the extension of the last added file(considering current filter) GtkFileFilter *gfilter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(widget)); - std::string filter = gtk_file_filter_get_name(gfilter); - - if(filter == LLTrans::getString("png_image_files")) - { - picker->mCurrentExtension = ".png"; - } - else if(filter == LLTrans::getString("targa_image_files")) + if(gfilter) { - picker->mCurrentExtension = ".tga"; - } + std::string filter = gtk_file_filter_get_name(gfilter); + if(filter == LLTrans::getString("png_image_files")) + { + picker->mCurrentExtension = ".png"; + } + else if(filter == LLTrans::getString("targa_image_files")) + { + picker->mCurrentExtension = ".tga"; + } + } // set the default path for this usage context. const char* cur_folder = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(widget)); -- cgit v1.2.3