[ 1885979 ] Segmentation fault on plot window maximize after hardcopy: debugged

This commit is contained in:
h_vogt 2008-05-01 16:53:30 +00:00
parent 5e0964c4d4
commit 30aba21d91
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include <cpdefs.h>
#include <fteinput.h>
#include <ftedev.h>
#include "ftedbgra.h"
#include "plotting/plotit.h"
#include "plotting/graphdb.h"
@ -60,6 +61,10 @@ com_hardcopy(wordlist *wl)
/* enable screen plot selection for these display types */
foundit = 0;
/* save current graphics context, because plotit() will create a new
currentgraph */
PushGraphContext(currentgraph);
#ifndef X_DISPLAY_MISSING
if (!wl && hc_button) {
@ -166,5 +171,8 @@ com_hardcopy(wordlist *wl)
if (tempf && *device)
(void) unlink(fname);
/* restore previous graphics context by retrieving the previous currentgraph */
PopGraphContext();
return;
}