[Scummvm-cvs-logs] scummvm master -> 8a46c017cf7c3a367a5caaa06c34921bbe76feb2

lordhoto lordhoto at gmail.com
Tue May 17 23:18:38 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8a46c017cf GUI: Fix for bug #3303501 "Switching from HQ2x->HQ3x crashes ScummVM".


Commit: 8a46c017cf7c3a367a5caaa06c34921bbe76feb2
    https://github.com/scummvm/scummvm/commit/8a46c017cf7c3a367a5caaa06c34921bbe76feb2
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-05-17T14:16:40-07:00

Commit Message:
GUI: Fix for bug #3303501 "Switching from HQ2x->HQ3x crashes ScummVM".

Changed paths:
    gui/options.cpp



diff --git a/gui/options.cpp b/gui/options.cpp
index e42d6c6..5cb70bc 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -357,6 +357,19 @@ void OptionsDialog::close() {
 			if (ConfMan.hasKey("fullscreen"))
 				g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen", _domain));
 			OSystem::TransactionError gfxError = g_system->endGFXTransaction();
+
+			// Since this might change the screen resolution we need to give
+			// the GUI a chance to update it's internal state. Otherwise we might
+			// get a crash when the GUI tries to grab the overlay.
+			//
+			// This fixes bug #3303501 "Switching from HQ2x->HQ3x crashes ScummVM"
+			//
+			// It is important that this is called *before* any of the current
+			// dialog's widgets are destroyed (for example before
+			// Dialog::close) is called, to prevent crashes caused by invalid
+			// widgets being referenced or similar errors.
+			g_gui.checkScreenChange();
+
 			if (gfxError != OSystem::kTransactionSuccess) {
 				// Revert ConfMan to what OSystem is using.
 				Common::String message = "Failed to apply some of the graphic options changes:";






More information about the Scummvm-git-logs mailing list