[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/gui.cpp server/vm/VM.cpp se...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gui.cpp server/vm/VM.cpp se... |
Date: |
Fri, 24 Nov 2006 17:50:47 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/11/24 17:50:47
Modified files:
. : ChangeLog
gui : gui.cpp
server/vm : VM.cpp VM.h
Log message:
* server/vm/VM.{cpp,h}: added isInitialized() method.
* gui/gui.cpp (resize_view): don't abort :)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1745&r2=1.1746
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/VM.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/VM.h?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1745
retrieving revision 1.1746
diff -u -b -r1.1745 -r1.1746
--- ChangeLog 24 Nov 2006 15:41:14 -0000 1.1745
+++ ChangeLog 24 Nov 2006 17:50:47 -0000 1.1746
@@ -1,5 +1,7 @@
2006-11-24 Sandro Santilli <address@hidden>
+ * server/vm/VM.{cpp,h}: added isInitialized() method.
+ * gui/gui.cpp (resize_view): don't abort :)
* server/asobj/Date.cpp: use proper case when registering class
interface.
* server/PropertyList.h: be case sensitive !
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- gui/gui.cpp 21 Nov 2006 00:25:46 -0000 1.50
+++ gui/gui.cpp 24 Nov 2006 17:50:47 -0000 1.51
@@ -21,14 +21,15 @@
#include "config.h"
#endif
-#include <cstdio>
-#include <cstring>
-
#include "sprite_instance.h"
#include "gui.h"
#include "render.h" // debug
#include "render_handler.h"
#include "movie_root.h"
+#include "VM.h"
+
+#include <cstdio>
+#include <cstring>
/// Define this to have updated regions enclosed in a red rectangle
/// In the future, enabling this might actually use a runtime flag
@@ -91,8 +92,9 @@
Gui::resize_view(int width, int height)
{
// GNASH_REPORT_FUNCTION;
- sprite_instance* m_sp = get_current_root();
- if (m_sp) {
+ if (VM::isInitialized()) {
+
+ sprite_instance* m_sp = VM::get().getRoot();
movie_root* m = dynamic_cast<movie_root*>(m_sp);
assert(m);
Index: server/vm/VM.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/VM.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/vm/VM.cpp 24 Nov 2006 14:50:30 -0000 1.2
+++ server/vm/VM.cpp 24 Nov 2006 17:50:47 -0000 1.3
@@ -16,7 +16,7 @@
//
-/* $Id: VM.cpp,v 1.2 2006/11/24 14:50:30 strk Exp $ */
+/* $Id: VM.cpp,v 1.3 2006/11/24 17:50:47 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -62,6 +62,12 @@
return *_singleton;
}
+bool
+VM::isInitialized()
+{
+ return _singleton.get();
+}
+
VM::VM(movie_definition& topmovie)
:
_swfversion(topmovie.get_version())
Index: server/vm/VM.h
===================================================================
RCS file: /sources/gnash/gnash/server/vm/VM.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/vm/VM.h 24 Nov 2006 14:50:30 -0000 1.2
+++ server/vm/VM.h 24 Nov 2006 17:50:47 -0000 1.3
@@ -115,11 +115,16 @@
///
static VM& init(movie_definition& movie);
+ /// Return true if the singleton VM has been initialized
+ static bool isInitialized();
+
/// Get the singleton instance of the virtual machine
//
/// Make sure you called VM::init() before trying to
/// get the singleton (an assertion would fail otherwise)
///
+ /// Use isInitialized() if you're unsure.
+ ///
static VM& get();
/// Get version of the SWF movie used to initialize this VM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/gui.cpp server/vm/VM.cpp se...,
Sandro Santilli <=