summaryrefslogtreecommitdiff
path: root/apps/examples/nxconsole/nxcon_wndo.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-03-27 22:33:15 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-03-27 22:33:15 +0000
commit3f871cbbae8fc67b704f267fadbb932046afd5ca (patch)
tree111caacdbfa612f833be4c211ac0cfd537ccadcc /apps/examples/nxconsole/nxcon_wndo.c
parent92d2b1784ad67d066b589a7e6923b4f76ca84bb2 (diff)
downloadnuttx-3f871cbbae8fc67b704f267fadbb932046afd5ca.tar.gz
nuttx-3f871cbbae8fc67b704f267fadbb932046afd5ca.tar.bz2
nuttx-3f871cbbae8fc67b704f267fadbb932046afd5ca.zip
Updaes for NX Console
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4531 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/nxconsole/nxcon_wndo.c')
-rw-r--r--apps/examples/nxconsole/nxcon_wndo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/examples/nxconsole/nxcon_wndo.c b/apps/examples/nxconsole/nxcon_wndo.c
index b052af0d2..6fadda866 100644
--- a/apps/examples/nxconsole/nxcon_wndo.c
+++ b/apps/examples/nxconsole/nxcon_wndo.c
@@ -119,9 +119,14 @@ static void nxwndo_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,
hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y,
more ? "true" : "false");
- /* Inform the NX console of the redraw request */
+ /* Don't attempt to redraw if the driver has not yet been opened */
- nxcon_redraw(g_nxcon_vars.hdrvr, rect, more);
+ if (g_nxcon_vars.hdrvr)
+ {
+ /* Inform the NX console of the redraw request */
+
+ nxcon_redraw(g_nxcon_vars.hdrvr, rect, more);
+ }
}
/****************************************************************************