summaryrefslogtreecommitdiff
path: root/indra/newview/llfilepicker.cpp
diff options
context:
space:
mode:
authormaxim@mnikolenko <maxim@mnikolenko>2013-10-04 13:43:45 +0300
committermaxim@mnikolenko <maxim@mnikolenko>2013-10-04 13:43:45 +0300
commite4c43d6bedcd463ad9fdae7a0564b8bbb467ccb7 (patch)
treeba4658f64567eaa129056d2addf2f5688811181e /indra/newview/llfilepicker.cpp
parent63cc379c72e3f30a6e45c4b81c5a2e7078be0f1e (diff)
MAINT-3247 FIXED Check that gfilter is not NULL.
Diffstat (limited to 'indra/newview/llfilepicker.cpp')
-rwxr-xr-xindra/newview/llfilepicker.cpp20
1 files changed, 11 insertions, 9 deletions
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));