diff options
| author | Manolo Gouy <Manolo> | 2011-07-20 16:06:02 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-07-20 16:06:02 +0000 |
| commit | 0c0305865a374d07431645912deb8893c014bd8d (patch) | |
| tree | 794ebeb7f7180c522e188e23053022372d4bbad6 /src | |
| parent | 2d52aebc6df88ce9b946a7afa49a1785fb1c8acb (diff) | |
Fixed crash under Solaris if no printer is defined.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/print_panel.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/print_panel.cxx b/src/print_panel.cxx index efc46d9c6..6f0ca506d 100644 --- a/src/print_panel.cxx +++ b/src/print_panel.cxx @@ -574,11 +574,11 @@ void print_update_status() { char name[1024]; int val; - snprintf(name, sizeof(name), "%s/page_size", printer); + snprintf(name, sizeof(name), "%s/page_size", printer == NULL ? "" : printer); print_prefs.get(name, val, 1); print_page_size->value(val); - snprintf(name, sizeof(name), "%s/output_mode", printer); + snprintf(name, sizeof(name), "%s/output_mode", printer == NULL ? "" : printer); print_prefs.get(name, val, 0); print_output_mode[val]->setonly(); } |
