We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73fae04 commit e7516a9Copy full SHA for e7516a9
1 file changed
graf2d/asimage/src/TASImage.cxx
@@ -2236,7 +2236,7 @@ Bool_t TASImage::InitVisual()
2236
fgBatch = false;
2237
}
2238
2239
- if (fgVisual && fgVisual->dpy) { // already initialized
+ if (fgVisual && (fgVisual->dpy || fgBatch)) { // already initialized
2240
return kTRUE;
2241
2242
@@ -2261,6 +2261,7 @@ Bool_t TASImage::InitVisual()
2261
Colormap cmap = (Colormap) gVirtualX->GetColormap();
2262
2263
if (!vis || cmap == 0) {
2264
+ destroy_asvisual(fgVisual, kFALSE);
2265
fgVisual = create_asvisual(nullptr, 0, 0, nullptr);
2266
} else {
2267
fgVisual = create_asvisual_for_id(disp, screen, depth,
0 commit comments